m |
m |
||
Line 34: | Line 34: | ||
} | } | ||
− | + | .active { | |
background-color: #4CAF50; | background-color: #4CAF50; | ||
} | } | ||
Line 175: | Line 175: | ||
$(function() { | $(function() { | ||
− | var pgurl = window.location.href.substr(window.location.href | + | var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/")+1); |
− | .lastIndexOf("/")+1); | + | |
$("#menu_li a").each(function(){ | $("#menu_li a").each(function(){ | ||
if($(this).attr("href") == pgurl || $(this).attr("href") == '' ) | if($(this).attr("href") == pgurl || $(this).attr("href") == '' ) | ||
$(this).addClass("active"); | $(this).addClass("active"); | ||
}) | }) | ||
− | }) | + | }) |
</style> | </style> |
Revision as of 15:42, 12 July 2016