[jQuery] Re: document.getElementById shortcut?

2008-11-23 Thread Michael Geary
The jQuery shortcut is: $('#myid')[0] If you want something faster and have no need for jQuery operations, then of course you can use document.getElementById directly, or wrap it in your own function: function whatever( id ) { return document.getElementById(id); } I don't think I'd recommend

[jQuery] Re: document.getElementById shortcut?

2008-11-23 Thread Erik Beeson
jQuery isn't a replacement for javascript. If you want document.getElementById, use it. If you want a shorter name, shortcut it yourself. If you want to get the DOM node out of a jQuery object, use $(...)[0] --Erik On Sun, Nov 23, 2008 at 9:34 PM, George [EMAIL PROTECTED] wrote: I found myself