Difference between revisions of "Template:Manchester/CSS"

m
m
Line 192: Line 192:
  
 
</menu_ul>
 
</menu_ul>
 +
</body>
 +
$(function() {
 +
    var pgurl = window.location.href.substr(window.location.href
 +
.lastIndexOf("/")+1);
 +
    $("#nav ul li a").each(function(){
 +
          if($(this).attr("href") == pgurl || $(this).attr("href") == '' )
 +
          $(this).addClass("active");
 +
    })
 +
});
  
 
</body>
 
 
</html>
 
</html>

Revision as of 15:24, 12 July 2016

Home Team Project $(function() { var pgurl = window.location.href.substr(window.location.href .lastIndexOf("/")+1); $("#nav ul li a").each(function(){ if($(this).attr("href") == pgurl || $(this).attr("href") == '' ) $(this).addClass("active"); }) });