top.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. $(document).ready(function(){
  2. //绑定头部清除缓存
  3. // $("#clearcache").bind("click",function(){
  4. // $("#info").html(LANG['AJAX_RUNNING']);
  5. // $("#info").show();
  6. // $.ajax({
  7. // url: $(this).attr("href"),
  8. // data: "ajax=1",
  9. // dataType: "json",
  10. // success: function(obj){
  11. // $("#info").html(obj.info);
  12. // $("#info").oneTime(2000, function() {
  13. // $(this).fadeOut(2,function(){$("#info").html("");});
  14. //
  15. // });
  16. // }
  17. // });
  18. // return false;
  19. // });
  20. //下拉菜单显示隐藏
  21. $(".navrightlist").bind('click',function(){
  22. $(this).toggleClass("active");
  23. });
  24. //绑定菜单按钮
  25. $("#navs").find("a").bind("click",function(){
  26. $("#navs").find("a").removeClass("active");
  27. parent.menu.location.href = $(this).attr("href");
  28. $(this).addClass("active");
  29. return false;
  30. });
  31. $("#navs").find("a").bind("focus",function(){$(this).blur();});
  32. $("#navs").find("a").first().click();
  33. //左侧菜单显示隐藏drag-frame
  34. $(".c-left-nav").bind('click',function(){
  35. toggleMenu();
  36. });
  37. });
  38. function toggleMenu()
  39. {
  40. frmBody = parent.document.getElementById('frame-body');
  41. imgArrow = document.getElementById('img');
  42. if (frmBody.cols == "0, 7, *")
  43. {
  44. frmBody.cols="221, 7, *";
  45. imgArrow.src = "__TMPL__Common/images/bar_close.gif";
  46. }
  47. else
  48. {
  49. frmBody.cols="0, 7, *";
  50. imgArrow.src = "__TMPL__Common/images/bar_open.gif";
  51. }
  52. }