标签:oca bit class new product parent 代码 back his
jquery代码:
<script>
$(document).ready(function () {
//$(".megamenu").megamenu();
$(".skyblue li a").each(function () {
if ($($(this))[0].href == String(window.location))
$(this).addClass(‘menuactive‘);
//$(this).parent().addClass(‘menuactive‘);
});
});
</script>
css代码:
.skyblue li a.color9:hover,.menuactive{
background:#9CB43A;
color: #ffffff;
}
Html代码:
<ul class="megamenu skyblue">
<%--<class="grid">--%>
<li><a class="color9" href="index.aspx">Home</a></li>
<li><a class="color9" href="AboutUS.aspx">About Us</a></li>
<li><a class="color9" href="Products.aspx">Products</a></li>
<li><a class="color9" href="Products.aspx">News</a></li>
<li><a class="color9" href="Exhibition.aspx">Exhibition</a></li>
<li><a class="color9" href="Terms.aspx">Terms</a></li>
<li><a class="color9" href="Enquiry.aspx">Enquiry</a></li>
<li><a class="color9" href="ContactUs.aspx">Contacts Us</a></li>
</ul>
标签:oca bit class new product parent 代码 back his
原文地址:http://www.cnblogs.com/suan1717/p/6859871.html