Skip to content

Instantly share code, notes, and snippets.

@firhome
Created April 16, 2013 05:54
Show Gist options
  • Select an option

  • Save firhome/5393675 to your computer and use it in GitHub Desktop.

Select an option

Save firhome/5393675 to your computer and use it in GitHub Desktop.
d
var getData = function(url, flag,fn) {
if (isAjax == true) {
isAjax = false;
$(".loading").css("display", "none");
$.ajax({
url: url,
type: "GET",
dataType: "html",
success: function(html) {
$(".dlist").append(html);
isAjax = true;
$(".loading").css("display", "block");
if (flag) {
urlNum++;
};
if(fn){
fn();
}
}
});
}
};
getData('xxx.html',false,function(){
setting_img.....
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment