load_more function added by Awais but forgot to commit it
This commit is contained in:
parent
da81712782
commit
df030f6b15
1 changed files with 34 additions and 1 deletions
|
@ -72,7 +72,40 @@ var loading_img_2 = "<img style='vertical-align:middle' src='"+imageurl+"/ajax-l
|
|||
}
|
||||
|
||||
|
||||
|
||||
function load_more(limit,mode,inner_mode,append_id,attrb,cat_id,total)
|
||||
{
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: baseurl + "/ajax.php",
|
||||
data: { limit : limit , mode : mode , inner_mode : inner_mode , cat_id : cat_id , total : total },
|
||||
dataType: 'json',
|
||||
success: function(response)
|
||||
{
|
||||
|
||||
if(response)
|
||||
{
|
||||
$('#' + append_id).append(response.template);
|
||||
$(attrb).attr({
|
||||
"limit":(parseInt(response.count) + parseInt(response.total))
|
||||
});
|
||||
|
||||
}
|
||||
if(response['limit_exceeds']==true)
|
||||
{
|
||||
attrb.css('display','none');
|
||||
}
|
||||
if(response=='limit_exceeds')
|
||||
{
|
||||
attrb.css('display','none');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function randomString()
|
||||
{
|
||||
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
|
||||
|
|
Loading…
Add table
Reference in a new issue