You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.8 KiB

8 years ago
  1. $(function(){
  2. // cms客服浮动面板
  3. if($("#cmsFloatPanel"))
  4. {
  5. $("#cmsFloatPanel > .ctrolPanel > a.arrow").click(function(){$("html,body").animate({scrollTop :0}, 800);return false;});
  6. var objServicePanel = $("#cmsFloatPanel > .servicePanel");
  7. var objMessagePanel = $("#cmsFloatPanel > .messagePanel");
  8. var objQrcodePanel = $("#cmsFloatPanel > .qrcodePanel");
  9. var w_s = objServicePanel.outerWidth();
  10. var w_m = objMessagePanel.outerWidth();
  11. var w_q = objQrcodePanel.outerWidth();
  12. $("#cmsFloatPanel .ctrolPanel > a.service").bind({
  13. click : function(){return false;},
  14. mouseover : function(){
  15. objMessagePanel.stop().hide();objQrcodePanel.stop().hide();
  16. if(objServicePanel.css("display") == "none"){
  17. objServicePanel.css("width","0px").show();
  18. objServicePanel.animate({"width" : w_s + "px"},600);
  19. }
  20. return false;
  21. }
  22. });
  23. $(".servicePanel-inner > .serviceMsgPanel > .serviceMsgPanel-hd > a",objServicePanel).bind({
  24. click : function(){
  25. objServicePanel.animate({"width" : "0px"},600,function(){
  26. objServicePanel.hide();
  27. });
  28. return false;
  29. }
  30. });
  31. $("#cmsFloatPanel > .ctrolPanel > a.message").bind({
  32. click : function(){return false;},
  33. mouseover : function(){
  34. objServicePanel.stop().hide();objQrcodePanel.stop().hide();
  35. if(objMessagePanel.css("display") == "none"){
  36. objMessagePanel.css("width","0px").show();
  37. objMessagePanel.animate({"width" : w_m + "px"},600);
  38. }
  39. return false;
  40. }
  41. });
  42. $(".messagePanel-inner > .formPanel > .formPanel-bd > a",objMessagePanel).bind({
  43. click : function(){
  44. objMessagePanel.animate({"width" : "0px"},600,function(){
  45. objMessagePanel.stop().hide();
  46. });
  47. return false;
  48. }
  49. });
  50. $("#cmsFloatPanel > .ctrolPanel > a.qrcode").bind({
  51. click : function(){return false;},
  52. mouseover : function(){
  53. objServicePanel.stop().hide();objMessagePanel.stop().hide();
  54. if(objQrcodePanel.css("display") == "none"){
  55. objQrcodePanel.css("width","0px").show();
  56. objQrcodePanel.animate({"width" : w_q + "px"},600);
  57. }
  58. return false;
  59. }
  60. });
  61. $(".qrcodePanel-inner > .codePanel > .codePanel-hd > a",objQrcodePanel).bind({
  62. click : function(){
  63. objQrcodePanel.animate({"width" : "0px"},600,function(){
  64. objQrcodePanel.stop().hide();
  65. });
  66. return false;
  67. }
  68. });
  69. }
  70. });