base.js 767 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * Created by 30947 on 2018/7/20.
  3. */
  4. $(function(){
  5. nav();
  6. })
  7. //导航条点击添加样式
  8. function nav(){
  9. //$(".nav>ul>li").click(function(){
  10. // var href=$(this).find("a").attr("href");
  11. // var t=href.indexOf("html");
  12. // var ins;
  13. // if(t!=-1){
  14. // ins=$(this).index();
  15. // $(".nav>ul>li").eq(ins).addClass("nav_active");
  16. // window.location.href=href;
  17. //
  18. //
  19. // }
  20. // else{
  21. // $(this).addClass("nav_active").siblings().removeClass("nav_active");
  22. // }
  23. //
  24. //})
  25. $(".nav>ul>li").hover(function(){
  26. $(this).find(".li_ul").stop(true,true).slideDown("slow");
  27. stop();
  28. },function(){
  29. $(this).find(".li_ul").slideUp("slow");
  30. })
  31. }