/ Published in: JavaScript

The class, "activeDDParent", needs css that will cause the parent to have the same hover effect it has when the mouse hovers over it. This class allows for the out-of-the-box sharepoint rollof delay. "portalnavwrapper" is just the class of a div I have that surrounds the global navigation piece. But this can be anything that encompasses the entire navigation region.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> var thishchild; $(function() { $('div[id*=zz1_GlobalNavigationn]').hover( function () { parentHighlight($(this)); }, function () { } ); $('.portalnavwrapper').hover( function () { }, function () { setTimeout("rollOffAll()",500); } ); }); function parentHighlight(child) { var linkIndex = child.attr('id'); if (linkIndex.indexOf("Items") > -1 ) { linkIndex = linkIndex.split("GlobalNavigationn")[1]; linkIndex = linkIndex.split('Items')[0]; $('#zz1_GlobalNavigationn' + linkIndex).addClass('activeDDParent'); } } function rollOffAll() { $(".activeDDParent").removeClass("activeDDParent"); } </script>
Comments
