Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript setTimeout not working after first time execution

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #253148
    Dejanzr
    Participant

    What am I doing wrong here ?

          var expanded = $('#block-mainnavigation .menu-item--expanded', context);
          var subMenu = $('#block-mainnavigation .menu-item--expanded .menu', context);
    
    
           expanded.mouseover(function () {
             $(this).find('.menu', context).show();
           });
    
    
         setTimeout(function () {
            expanded.mouseleave(function () {
              subMenu.hide();
            })
            }, 3000);
    
Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.