global.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. $(function(){
  2. $(".formLine .textTips,.regForm .tips").click(function(){
  3. $(this).siblings(".text,.inputText").focus();
  4. });
  5. $(".formLine .text").focus(function(){
  6. $(this).siblings(".textTips,.tips").css("color", "#CCC");
  7. });
  8. // 非ie
  9. $(".formLine .text,.regForm .inputText").bind("input", function(){
  10. var curVal = $(this).val();
  11. var label = $(this).siblings(".textTips,.tips");
  12. if(curVal != "") {
  13. label.hide();
  14. }else{
  15. label.show();
  16. }
  17. });
  18. // ie
  19. $(".formLine .text,.regForm .inputText").bind("propertychange", function(){
  20. var curVal = $(this).val();
  21. var label = $(this).siblings(".textTips,.tips");
  22. if(curVal != "") {
  23. label.hide();
  24. }else{
  25. label.show();
  26. }
  27. });
  28. $(".formLine .text,.regForm .inputText").blur(function(){
  29. var curVal = $(this).val();
  30. var label = $(this).siblings(".textTips,.tips");
  31. if(curVal == "") {
  32. label.css("color", "#999");
  33. }
  34. });
  35. var zhemail = $("#zhusername").val();
  36. if(zhemail != "") {
  37. var label = $("#zhusername").siblings(".textTips");
  38. label.hide();
  39. };
  40. var zhemail = $("#zhuserpasswd").val();
  41. if(zhemail != "") {
  42. var label = $("#zhuserpasswd").siblings(".textTips");
  43. label.hide();
  44. };
  45. var zhemail = $("#zhemail").val();
  46. if(zhemail != "") {
  47. var label = $("#zhemail").siblings(".tips");
  48. label.hide();
  49. };
  50. var zhuser = $("#zhuser").val();
  51. if(zhuser != "") {
  52. var label = $("#zhuser").siblings(".tips");
  53. label.hide();
  54. };
  55. var zhanswer = $("#zhanswer").val();
  56. if(zhanswer != "") {
  57. var label = $("#zhanswer").siblings(".tips");
  58. label.hide();
  59. };
  60. $(".zhzdFir").click(function () {
  61. $(this).toggleClass("now").siblings(".zhzdMenu").slideToggle("fast")
  62. });
  63. $(".warpDownload li").hover(function(){
  64. $(this).find("a.info").show()
  65. },
  66. function(){
  67. $(this).find("a.info").hide()
  68. });
  69. $(".payWayTab li").hover(function () {
  70. $(this).addClass("hover");
  71. },
  72. function () {
  73. $(this).removeClass("hover");
  74. }
  75. );
  76. var i=1;
  77. var show_li = $(".payWayTab li");
  78. show_li.each(function(index){
  79. $(this).click(function(){
  80. $(this).addClass("now").siblings().removeClass("now");
  81. $(".payWayContent .wayItem").hide().eq($(".payWayTab li").index(this)).show();
  82. i=index+1;
  83. });
  84. });
  85. $("input[type=radio]:checked").parent().parent().addClass("focus");
  86. $("input[type=radio]").click(function () {
  87. $(this).parent().parent().addClass("focus");
  88. $(this).parent().parent().siblings("li").removeClass("focus");
  89. });
  90. });