/ / Page load
jQuery (document) .ready (function ($) {
var loading=false
$("div-sharppost-read-more a").click( function() {
if(loading)return
loading=true
$this = $(this);
$this.addClass("loading").text("Loading"); //aloadingclass
var href = $this.attr("href"); //
if (href != undefined) { //
$.ajax( { //ajax
url: href, //
type: "get", //get
error: function(request) {
loading=false
},
success: function(data) { //
loading=false
$this.removeClass("loading").text(""); //loading
var $res = $(data).find(".list"); //
$(".box").append($res); //posts-loop
var newhref = $(data).find("-sharppost-read-more a").attr("href"); //
if( newhref != undefined ){
$("-sharppost-read-more a").attr("href",newhref);
}else{
$("-sharppost-read-more a").html("").removeAttr("href");
}
}
});
}
return false;
});
});
loaded to no, that is, the final display is gone, you can click on it, and continue to display loading-style text. How to solve it? how to modify