global.js 2.4 KB

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