global.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // JavaScript Document
  2. $('#myModal').on('shown.bs.modal', function () {
  3. $('#myInput').focus()
  4. });
  5. $('#myTabs a').click(function (e) {
  6. e.preventDefault()
  7. $(this).tab('show')
  8. });
  9. $(document).ready(function(){
  10. $(".subMenuContent").hide();
  11. $(".subMenuTitle a").click(function(){
  12. $(".subMenuTitle a").removeClass("sidebg");
  13. $(this).addClass("sidebg");
  14. $(this).parent().next().removeClass("menu-list");
  15. $(".menu-list").slideUp();
  16. $(this).parent().next().slideToggle();
  17. $(this).parent().next().addClass("menu-list");
  18. });
  19. $(".leftWrapper").hover(function(){
  20. timer = setTimeout(function(){
  21. $(".leftWrapper").stop().animate({width:"200px"},500);
  22. $(".mainWrapper").stop().animate({marginLeft:"215px",marginRight:"-200px"},500);
  23. $(".subMenuText").fadeIn(500);
  24. $(".logoInfo").show(500);
  25. },300);
  26. },function(){
  27. clearTimeout(timer);
  28. $(".leftWrapper").stop().animate({width:"56px"},500);
  29. $(".mainWrapper").stop().animate({marginLeft:"61px",marginRight:"15px",paddingRight:"0"},500);
  30. $(".subMenuText").fadeOut("fast");
  31. $(".logoInfo").hide();
  32. $(".subMenuContent").slideUp();
  33. });
  34. $(".logo").hover(function(){
  35. $(".logoList").show();
  36. },function(){
  37. $(".logoList").hide();
  38. });
  39. $(".tablelist").tablesorter({widthFixed: true});
  40. // $(".dropdown-toggleSF").click(function(){
  41. // $(this).next().toggle();
  42. // });
  43. // $(document).bind("click",function(e){
  44. // var target = $(e.target);
  45. // if(target.closest(".dropdown-toggleSF,.dropdown-list li").length == 0){/*.closest()沿 DOM 树向上遍历,直到找到已应用选择器的一个匹配为止,返回包含零个或一个元素的 jQuery 对象。*/
  46. // $(".dropdown-list").hide();
  47. // };
  48. // e.stopPropagation();
  49. // });
  50. });