I am trying to replace some div text automatically using the .html command in Jquery but it's not working for me. This is the code I have so far:
<div id="test">123</div>
<script type="text/javascript">
jQuery(document).ready(function(){
var refreshId = setInterval(function()
{
$('#test').html("test");
}, 1000);
});
</script>
Could someone tell me what I'm doing wrong please? I have ran tests to make sure Jquery is working and it is, and if I run alert('test'); then that works fine.
Thanks for any help
Edit: I have ran the script in another file on localhost and it works fine - could it be something within the code I'm using already that's stopping it from working? This is baffling me!
setInterval? MaybesetTimeout?