Yeah, thanks Klaus ;)

2006/11/17, Klaus Hartl <[EMAIL PROTECTED]>:
> Roberto Ortelli schrieb:
> > Hello,
> > A few weeks ago I've written a small plugin for that:
> >
> > $.fn.fieldFocus = function(id){
> >       document.getElementById(id).focus();
> > }
> >
> > and you call it using:
> > $(document).fieldFocus("the_id_of_the_input_field_without_#");
>
> That is exactly the same as if you were doing this:
>
> $('#the_id_of_the_input').get(0).focus();
>
> And that's two lines less ;-)
>
>
> -- Klaus
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>


-- 
Roberto Ortelli
http://weblogger.ch

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to