Return to Snippet

Revision: 57929
at June 15, 2012 08:35 by rumremix


Initial Code
<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>

Initial URL


Initial Description
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.

Initial Title
get hover effect of global nav parent link to roll off at same time dropdown goes away in out of the box sharepoint global nav

Initial Tags
sharepoint

Initial Language
JavaScript