SO, I'm trying to create a javascript object, and use the setInterval method.
This doesn't seem to be working. If I remove the quotes, then the method runs once. Any ideas why? Also, I'm using Jquery.
<script>
$(function(){
var kP = new Kompost();
setInterval('kP.play()', kP.interval);
});
var Kompost = function()
{
this.interval = 5000;
var kompost = this;
this.play = function()
{
alert("hello");
}
}
</script>