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 discuss@jquery.com http://jquery.com/discuss/