Please help me set this jquery cookies
2 posters
Page 1 of 1
Please help me set this jquery cookies
- Code:
$(".ldulieu").load("/search?search_keywords=codefm&is_tag=true&search_time=0&show_results=topics table.table .statused tr:lt(15)", function() {
var a;
for (a = 0; 15 > a; a++) $(".lreply:eq(" + a + ")").html($(".ldulieu tr:eq(" + a + ") .tc3:eq(0)").html()), $(".lviews:eq(" + a + ")").html($(".ldulieu tr:eq(" + a + ") .tc3:eq(1)").html());
$(".latesttopicz").show()
});
I need to set cookies for jquery passage in 24 hours, would you please help me
Re: Please help me set this jquery cookies
please post the link of your forum with this table
Ch@lo Valdez- Forumember
- Posts : 138
Reputation : 50
Language : spanish
Re: Please help me set this jquery cookies
ok i think you want storage data every 24 hrs and after this time update with load function
try with:
try with:
- Code:
$(function () {
var a, b, d, c, w = window.localStorage;
if (w.getItem("latesttopic_") || w.getItem("latesttopic_exp_") > +new Date - 24 * 60 * 60 * 1000) {
$(".ldulieu").html(w.getItem("latesttopic_"))
} else {
$(".ldulieu").length > 0 && $(".ldulieu").load("/search?search_keywords=codefm&is_tag=true&search_time=0&show_results=topics table.table .statused tr:lt(15)", function () {
for (a = 0; 15 > a; a++) {
b = $(".ldulieu tr:eq(" + a + ") .tc3:eq(0)").html();
c = $(".ldulieu tr:eq(" + a + ") .tc3:eq(1)").html();
$(".lreply:eq(" + a + ")").html(b),
$(".lviews:eq(" + a + ")").html(c);
$(".latesttopicz").show();
}
d = $(".ldulieu").html();
w.setItem("latesttopic_", d);
w.setItem("latesttopic_exp_", +new Date);
});
}
});
Ch@lo Valdez- Forumember
- Posts : 138
Reputation : 50
Language : spanish
zzlasperpen likes this post
Similar topics
» JQuery Help
» Help with Java/Jquery
» Ajax or Json and Jquery
» jQuery to JS not workin
» JQuery Slide up and down
» Help with Java/Jquery
» Ajax or Json and Jquery
» jQuery to JS not workin
» JQuery Slide up and down
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum