sorry ... not the smartest question. of course, one returns the element, one returns the jquery object.
What I needed was $('#id').attr( { autocomplete : "off" } ); I still have a problem to set the focus though. There is no error shown for $('#id').focus(); but the focus is not set ... On 1/15/07, Daniel McBrearty <[EMAIL PROTECTED]> wrote: > I'm changing some old js I had to use jQuery. > > I used to have a function like this (to select a certain text input on > a form and automatically focus on it) ... : > > window.onload = function() { > self.focus(); > > document.getElementById("userresponse").setAttribute("autocomplete","off"); > document.getElementById("userresponse").focus(); > } > > which worked fine ... then I replace it with this: > > $(function () { > self.focus(); > $("#userresponse").setAttribute("autocomplete","off"); > $("#userresponse").focus(); > }); > > which fails to select the text box. why not? I thought these were > equivalent excpet the jQuery version loads sooner? > > thanks > > Daniel > > > -- > Daniel McBrearty > email : danielmcbrearty at gmail.com > www.engoi.com : the multi - language vocab trainer > BTW : 0873928131 > -- Daniel McBrearty email : danielmcbrearty at gmail.com www.engoi.com : the multi - language vocab trainer BTW : 0873928131 _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/