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
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);