liyan %!s(int64=6) %!d(string=před) roky
rodič
revize
76730b640f
2 změnil soubory, kde provedl 10 přidání a 4 odebrání
  1. 4 4
      fund_h5_01/choose_city.html
  2. 6 0
      fund_h5_01/js/choice_city.js

+ 4 - 4
fund_h5_01/choose_city.html

@@ -75,16 +75,16 @@
75 75
     <script src="./js/tips.js?vv=4"></script>
76 76
     <script src="./js/city_picker.js?vv=10"></script>
77 77
     <script src="./js/choose_city.js?vv=12"></script>
78
-    <script src="./js/choice_city.js?v=11"></script>
78
+    <script src="./js/choice_city.js?v=12"></script>
79 79
 </body>
80 80
 
81 81
 </html>
82 82
 <script type="text/javascript">
83 83
 	$(".search input").focus(function () {
84 84
 		if ($('html').scrollTop()) {
85
-	        $('html').animate({ scrollTop: 0 }, 10);
85
+	        $('html').scrollTop(0);
86 86
 	        return false;
87 87
 	    }
88
-	    $('body').animate({ scrollTop: 0 }, 10);
88
+	    $('body').scrollTop(0);
89 89
 	})
90
-</script>
90
+</script>

+ 6 - 0
fund_h5_01/js/choice_city.js

@@ -53,6 +53,12 @@ function renderLoginInfo(cityInfo) {
53 53
 		var searchName = $("#search input").val().trim();
54 54
 		var html = '';
55 55
 		if(searchName != ""){
56
+			if ($('html').scrollTop()) {
57
+				$('html').scrollTop(0);
58
+				return false;
59
+			    }
60
+			    $('body').scrollTop(0);
61
+
56 62
 			$("#search").removeClass("search");
57 63
 			$("#search").addClass("search_02");
58 64
 			$(".searchBox").css({