setTimeout(functionName,timeInMillisec ,[function arguments (optional)]) should do the trick :
jQuery(document).ready(function($) { function removeReadOnly(){ $("input").removeAttr("readonly"); } setTimeout(removeReadOnly,5000); }); -----Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Learner Sent: mardi 31 juillet 2007 3:24 To: jQuery (English) Subject: [jQuery] Text Box readonly I am writing a small script at the moment that requires a text box to be readonly for a period of time and once that time is up then I want to remove the readonly attribute, is there a way to allow this to happen after a duration of time has passed or after an event has happened. jQuery(document).ready(function($) { $("input").attr("readonly", "readonly"); $("input").removeAttr("readonly"); }); not sure how to delay the removeAttr event for a duration of time as I can only find a delay in the effects area. Thankyou for your help Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.11.0/927 - Date: 30/07/2007 17:02