Thanks guys, I got rid of the function and using this. $('a.respond').bind('click', function() { $(this).prev('div').block('<h1>Please <a href=\"login\">Login</ a> to submit your opinion.</a></h1>',{ border: '3px solid #a00'}); return false; });
so wouldnt I need to chain the settimeout onto this and set it to call the function $.unblockUI? On Apr 2, 11:33 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > Your setTimeout syntax looks a little off. Maybe: > > setTimeout(function() { $el.unblock(); }, 5000); > > --Erik > > On 4/2/07, Mike Alsup <[EMAIL PROTECTED]> wrote: > > > > > Tom, > > > If you're still using a function to block, it's something like this: > > > function blockElement(id) { > > var $el =$('#'+id); > > $el.block(); > > setTimeout(function() { $el.unblock(); 5000 }); > > } > > > On 4/2/07, Tom Shafer <[EMAIL PROTECTED]> wrote: > > > > How could I use settimeout on block so that blockui will goway after a > > > certain amount of time?