load(); Problem
load(); Problem
Hi all,
I am using load(); to do an auto refresh for a single div every 10 seconds. That div contains an inner div, which is style="display:none;" by default. After the first auto refresh I want to style="display:block;" that div.
Here comes my code:
JS:
$('#messages').load('http://localhost/surcle/requests/update_messages.php);
document.getElementById('message_1').style.display = 'block';
HTML:
<div id="messages">...<div id="message_1" style="display:none;">...</div>...</div>
However for some reason it does not work that way. The message_1 div appears for like 10ms after every auto refresh but gets hidden directly again, any advice?
Many thanks!