Keleth
03-05-2012, 10:34 PM
So I have a very simple block of code:
function successfulReg() {
alert(1);
// $.colorbox({ html: '<p>Registration successful!</p>' });
}
if ($('#regSuc').size()) setTimeout('successfulReg', 1000);
If the regSuc item exists (1 second after the page loads), I want to bring up a lightbox. As I couldn't get this to work, I tried to get an alert to show up. This did not work either.
I changed the setTimeout to
if ($('#regSuc').size()) setTimeout('alert(1), 1000);
Which did work. And I tried successfulReg and succesfulReg(), neither of which worked. Am I missing some basic element to getting a timeout to work?
function successfulReg() {
alert(1);
// $.colorbox({ html: '<p>Registration successful!</p>' });
}
if ($('#regSuc').size()) setTimeout('successfulReg', 1000);
If the regSuc item exists (1 second after the page loads), I want to bring up a lightbox. As I couldn't get this to work, I tried to get an alert to show up. This did not work either.
I changed the setTimeout to
if ($('#regSuc').size()) setTimeout('alert(1), 1000);
Which did work. And I tried successfulReg and succesfulReg(), neither of which worked. Am I missing some basic element to getting a timeout to work?