Return to Snippet

Revision: 21937
at December 24, 2009 14:27 by kanampo


Initial Code
$(document).ready(function(){

// Highlight Tab v.01 by Jake Rutter
// Website: http://www.onerutter.com
// Feel free to use and adapt, please just give credit where credit is due.
// ----------- highlight tab function -----------
    var path = location.pathname;   
    var mediaString = location.search;
    var mediaPath = path + mediaString;
    var home = "/";
    $("a[href='" + [ path ] + "']").parents("li").each(function() { 
        $(this).addClass("active");
    });
    
    $("a[href='" + [ mediaPath ] + "']").parents("li").each(function() {    
        $(this).addClass("active");
    });   
    
});

Initial URL
http://onerutter.com/css/jquery-highlight-tab-v01-javascript.html

Initial Description


Initial Title
jQuery Highlight Navigation Menu v.01 Script

Initial Tags
jquery

Initial Language
jQuery