global.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. var zhmobile = $("#zhmobile").val();
  61. if(zhmobile != "") {
  62. var label = $("#zhmobile").siblings(".tips");
  63. label.hide();
  64. };
  65. $(".zhzdFir").click(function () {
  66. $(this).toggleClass("now").siblings(".zhzdMenu").slideToggle("fast")
  67. });
  68. $(".warpDownload li").hover(function(){
  69. $(this).find("a.info").show()
  70. },
  71. function(){
  72. $(this).find("a.info").hide()
  73. });
  74. $(".payWayTab li").hover(function () {
  75. $(this).addClass("hover");
  76. },
  77. function () {
  78. $(this).removeClass("hover");
  79. }
  80. );
  81. var i=1;
  82. var show_li = $(".payWayTab li");
  83. show_li.each(function(index){
  84. $(this).click(function(){
  85. $(this).addClass("now").siblings().removeClass("now");
  86. $(".payWayContent .wayItem").hide().eq($(".payWayTab li").index(this)).show();
  87. i=index+1;
  88. });
  89. });
  90. $("input[type=radio]:checked").parent().parent().addClass("focus");
  91. $("input[type=radio]").click(function () {
  92. $(this).parent().parent().addClass("focus");
  93. $(this).parent().parent().siblings("li").removeClass("focus");
  94. });
  95. });