View Single Post
Old 08-09-2009, 08:16 PM   PM User | #1
schotte
Regular Coder

 
Join Date: Nov 2004
Location: Edinburgh, SCO
Posts: 113
Thanks: 0
Thanked 0 Times in 0 Posts
schotte is an unknown quantity at this point
[jQuery] setTimeout issue

Hey all,

as I mentioned in the title, I've an issue getting setTimeout to work inside a plugin I am developing.

Code:
$.Plugin = function(obj,opt)
{
     init();
     
     function init() { ... };
     function heartbeat() { ... };

     setTimeout('heartbeat();', 1000);
}
Error: heartbeat is not defined

Anyone dealt with this before?

Cheers

Last edited by schotte; 08-10-2009 at 08:49 AM..
schotte is offline   Reply With Quote