XMTT 7 years ago
parent
commit
8365ff709b
1 changed files with 17 additions and 17 deletions
  1. 17 17
      js/discover.js

+ 17 - 17
js/discover.js

@ -73,8 +73,8 @@ $(function() {
73 73
                linkNum = $(this).index(".table-tab-slide");
74 74
                $(".haveData").find("ul").each(function () {
75 75
                    $(this).html("");
76
                    $(this).parent().find(".continue").unbind("click");
77
                    $(this).parent().find(".continue").show();
76
                    $(this).parent().find("button").unbind("click");
77
                    $(this).parent().find("button").show();
78 78
                });
79 79
                $("#table-item-"+linkNum).html("");
80 80
                dataColNum=$(this).attr('data-col');
@ -175,10 +175,10 @@ $(function() {
175 175
			},
176 176
			"beforeSend": function() {
177 177
				// $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
178
                $("#table-item-"+index).parent().find(".continue").css("pointer-events", "none");
178
                $("#table-item-"+index).parent().find("button").attr("disabled",true);
179 179
			},
180 180
			"complete":function () {
181
                $("#table-item-"+index).parent().find(".continue").css("pointer-events", "");
181
                $("#table-item-"+index).parent().find("button").removeAttr("disabled");
182 182
            },
183 183
			"success" : function(data) {
184 184
				if (data.success){
@ -203,13 +203,13 @@ $(function() {
203 203
					}
204 204
					//分页
205 205
					if(isbind==true){
206
                        $("#table-item-" + idItem).parent().find(".continue").on("click", function () {
206
                        $("#table-item-" + idItem).parent().find("button").on("click", function () {
207 207
                            listShow(obj, ++pageNo, colNum, false, idItem);
208 208
                        });
209 209
					}
210 210
                    if (pageNo >= Math.ceil(data.data.total / 10)) {
211
                        $("#table-item-" + idItem).parent().find(".continue").unbind("click");
212
                        $("#table-item-" + idItem).parent().find(".continue").hide();
211
                        $("#table-item-" + idItem).parent().find("button").unbind("click");
212
                        $("#table-item-" + idItem).parent().find("button").hide();
213 213
					}
214 214
					$(".loading").remove();
215 215
				}
@ -234,10 +234,10 @@ $(function() {
234 234
            },
235 235
            "beforeSend": function() {
236 236
                // $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
237
                $("#table-item-0").parent().find(".continue").css("pointer-events", "none");
237
                $("#table-item-0").parent().find("button").attr("disabled",true);
238 238
            },
239 239
			"complete":function () {
240
                $("#table-item-0").parent().find(".continue").css("pointer-events", "");
240
                $("#table-item-0").parent().find("button").removeAttr("disabled");
241 241
            },
242 242
            "success" : function(data) {
243 243
                if (data.success){
@ -268,13 +268,13 @@ $(function() {
268 268
                    }
269 269
                    //分页
270 270
                    if(isbind==true){
271
                        $("#table-item-0").parent().find(".continue").on("click", function () {
271
                        $("#table-item-0").parent().find("button").on("click", function () {
272 272
                            firstListShow(false);
273 273
                        });
274 274
                    }
275 275
                    if (dataStr.length < rows) {
276
                        $("#table-item-0").parent().find(".continue").unbind("click");
277
                        $("#table-item-0").parent().find(".continue").hide();
276
                        $("#table-item-0").parent().find("button").unbind("click");
277
                        $("#table-item-0").parent().find("button").hide();
278 278
                    }
279 279
                    $(".loading").remove();
280 280
                }
@ -298,10 +298,10 @@ $(function() {
298 298
			},
299 299
			"beforeSend": function() {
300 300
				// $(".table-body").append('<img src="../images/loading.gif" class="loading" />');
301
                $("#table-item-3").parent().find(".continue").css("pointer-events", "none");
301
                $("#table-item-3").parent().find("button").attr("disabled",true);
302 302
			},
303 303
			"complete":function () {
304
                $("#table-item-3").parent().find(".continue").css("pointer-events", "");
304
                $("#table-item-3").parent().find("button").removeAttr("disabled");
305 305
            },
306 306
			"success" : function(data) {
307 307
				if (data.success){
@ -323,13 +323,13 @@ $(function() {
323 323
					}
324 324
					//分页
325 325
                    if(isbind==true){
326
                        $("#table-item-" + idItem).parent().find(".continue").on("click", function () {
326
                        $("#table-item-" + idItem).parent().find("button").on("click", function () {
327 327
                            getWenda(false);
328 328
                        });
329 329
                    }
330 330
                    if (dataStr.length < rows) {
331
                        $("#table-item-3").parent().find(".continue").unbind("click");
332
                        $("#table-item-3").parent().find(".continue").hide();
331
                        $("#table-item-3").parent().find("button").unbind("click");
332
                        $("#table-item-3").parent().find("button").hide();
333 333
                    }
334 334
                    $(".loading").remove();
335 335
				}