global.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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("bg");
  13. $(this).addClass("bg");
  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. $(".mainWrapperSma").stop().animate({marginLeft:"185px",marginRight:"-200px"},500);
  24. $(".subMenuText").fadeIn(500);
  25. $(".logoInfo").show(500);
  26. },300);
  27. },function(){
  28. clearTimeout(timer);
  29. $(".leftWrapper").stop().animate({width:"60px"},500);
  30. $(".mainWrapper").stop().animate({marginLeft:"71px",marginRight:"15px",paddingRight:"0"},500);
  31. $(".mainWrapperSma").stop().animate({marginLeft:"45px",marginRight:"15px",paddingRight:"0"},500);
  32. $(".subMenuText").fadeOut("fast");
  33. $(".logoInfo").hide();
  34. $(".subMenuContent").slideUp();
  35. });
  36. $(".logo").hover(function(){
  37. $(".logoList").show();
  38. },function(){
  39. $(".logoList").hide();
  40. })
  41. });