Reputation: 49
I wrote a code that will reload a div without refresh the page, like this:
$("#content").load(" #content");
It works but the CSS I have on its contents changed. Is there a way I could load this and still have my style sheet effective on it?
Upvotes: 1
Views: 33
Reputation: 505
The setInterval()
method calls a function or evaluates an expression at specified intervals (in milliseconds
).
Tip: 1000 ms = 1 second.
setInterval(function_name(), 1000);
Upvotes: 1