Jquery mouseover function not firing

maeijuh

New Member
I have this Jquery code:\[code\]$(document).ready(function() { // Do menu mouseovers $('.bar a').each(function() { var Link = $(this); var LinkID = Link.attr("ID"); $('.menu-pop').each(function() { var PopID = $(this).attr("data-for"); // We have found a match, assign events if (PopID == LinkID) { Link.mouseover = (function() { alert("trucks lol"); }); return; } }); });});\[/code\]It's for a popup menu I'm writing. The simplified structure of the menu is:\[code\]<div class="bar"> <a class="item">Home</a> <a class="item" id="mnuAnother">Another Link</a></div><div class="menu-pop" data-for="mnuAnother"> Links and stuff</div>\[/code\]I'm expecting it to do the alert when my mouse goes over the "Another" link, but at present it throws no errors/no alert.Any help appreciated.
 
Top