asp.net - hover event problem with jquery -


Im trying to put a hover effect on every menu item i im building a menu and im all but when i ... Hover everything is working great and I think that I want html and has a background image in the menu item.

But the unashover effect is not the most frequent fire. I came to know that if I move my mouse horzantlyly across the ul menu it works fine but if my mouse does a vertical trick on the LE item then it does not look like a fire. My code is:

  $ ("ul.menu li"). Hover (ChangeHowmoreMenu Itam, Changejackmenu Atom); ChangeToHoverMenuItem () function {var currLi = $ (this); Previous = serial; Var currMenuItemText = currLi.find ("a"). Text (); CurrLi.html (""); CurrLi.append ("

Thanks

The strange thing is, that Incident between mouseentave ()

For an idea mouseenter () register a mouseenter () and mouseleave () to use the event Instead of hover () . Hover () should do the same, but it will know how. If this works, then the problem is in the implementation of hover () , but I do not think so.

  $ ("ul.menu li"). Mousecenter (changeholmermenuite). Moussev (changeback menu atom);  

Another idea is to ensure that the mouseleave () code is executed. In your "Doveover" handler, you can check whether someone has hoveredItem . If so, you can still call the ChangeBackMenuItem function as the hovered item as this . To make sure that when you leave your UL, then "Anhor" handler is called, you need a mouseover event on it, which does the same thing as the UL element But depending on a working mouseleave .

  $ (function () {var hoveredItem = null; function ChangeToHoverMenuItem () {if (hoveredItem) {ChangeBackMenuItem.call (hoveredItem);} hoveredItem = this; var currLi = $ (this) ; Last lily = currLi; var currMenuItemText = currLi.find ("a"). Text (); currLi.html (""); currLi ("+" "+ + Curl menu type +" "+" ");} Function Changebox menu () {Var currLi = $ (this); var currMenuItemText = currLi.find ("a"). Text (); currLi.html (""); CurrLi.append ("" + currMenuItemText + ""; hoveredItem = null ;} $ ("Ul.menu li"). Hover (changeHowwerMenuItem, changebackup menu); $ ("ul.menu"). Mouseleave (function (if (hoveredItem) {ChangeBackMenuItem.call (hoveredItem); hoveredItem = null; }}};});  

Comments