thanks mike, im getting the hang of this. $this is your friend im learning
On Apr 3, 6:32 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote: > Tom, > > Just add the timeout after you've called block(). > > $('a.respond').bind('click', function() { > var $el = $(this); > $el.prev('div').block('<h1>Please <a href=\"login\">Login</a> to > submit your opinion.</a></h1>',{ border: '3px solid #a00'}); > setTimeout(function(){ $el.unblock(); }, 5000); > return false; > > }); > > Mike > > PS: Thanks Erik! > > On 4/3/07, Tom Shafer <[EMAIL PROTECTED]> wrote: > > > > > 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?