Using jQuery, how can I ajax load text into multiple .classes rather than
#id's?
On my website I have a commenting form which tells you how long ago a
comment was posted.
Below is a code to reload only the span containing the date every 10
seconds, NOT the entire comments div (to prevent page-lag)
$(function(){
setInterval(
function(){
var id = $('.date').html();
$('.date').load('/comdate.php?id=' + id); }
,10000);
});
my function is not working, and I don't really want to make a seperate
function for every comment's date field. Please may someone point out my
problem? Thanks
No comments:
Post a Comment