求帮我看看,为什么点击跳转到另外的页面导航栏样式没有改变_html/css_WEB-ITnose
来源:动视网
责编:小采
时间:2020-11-27 16:36:51
求帮我看看,为什么点击跳转到另外的页面导航栏样式没有改变_html/css_WEB-ITnose
求帮我看看,为什么点击跳转到另外的页面导航栏样式没有改变_html/css_WEB-ITnose:$(document).ready(function(){ $(#memu a).each(function(){ $this= $(this); if($this[0].href==String(window.location)){ $this.addClass(active); } }); }); 首页产品服务案例联系我们 回复讨论(解决方案) $this.parent().addClass(active); $this.pa
导读求帮我看看,为什么点击跳转到另外的页面导航栏样式没有改变_html/css_WEB-ITnose:$(document).ready(function(){ $(#memu a).each(function(){ $this= $(this); if($this[0].href==String(window.location)){ $this.addClass(active); } }); }); 首页产品服务案例联系我们 回复讨论(解决方案) $this.parent().addClass(active); $this.pa

$(document).ready(function(){ $("#memu a").each(function(){ $this= $(this); if($this[0].href==String(window.location)){ $this.addClass("active"); } }); });
回复讨论(解决方案)
$this.parent().addClass("active");
$this.parent().addClass("active");
还是不行啊
调试找原因
刷新下页面。
调试找原因
已解决,谢谢
求帮我看看,为什么点击跳转到另外的页面导航栏样式没有改变_html/css_WEB-ITnose
求帮我看看,为什么点击跳转到另外的页面导航栏样式没有改变_html/css_WEB-ITnose:$(document).ready(function(){ $(#memu a).each(function(){ $this= $(this); if($this[0].href==String(window.location)){ $this.addClass(active); } }); }); 首页产品服务案例联系我们 回复讨论(解决方案) $this.parent().addClass(active); $this.pa