As you quite rightly say, the $() 'doohickey' returns a jquery object that is a bit like an array of zero or more html elements. Without some help, regular javascript won't know what to do with the doohickey, so if you need the element itself you extract it using the .get(0) method (where 0 means you want the first item in the jquery 'array').
So you need to change you example to look like this: iframe = $("#editorpane") ; // Fetch a jquery array containing one element. iframe.get(0).contentWindow.document.designMode = "on"; Note: You may also see different syntax in some examples, they mean the same thing: iframe[0] & iframe.get(0) I hope this is what you're after George theteep wrote: > > Hi there, > > Currently writing a simple Rich Text Editor using jQuery to replace a > <textarea>. Am new to jQuery so have been learning as I go :) > > In the old days, to activate an iframe for editing, one would do: > > iframe = document.getElementById('editorpane') ; > iframe.contentWindow.document.designMode = "on"; > > is it possible for me to replace this code and avoid using getElementById > with > > iframe = $("#editorpane) ; > iframe.contentWindow.document.designMode = "on"; > > I guess my question is really what *exactly* does the $() doohickey > return? know that if you wrap the returned variable in $(...) then you > can access it as a jQuery object, but if you don't do this, then can you > use it as a normal javascript object? > > Hope this makes sense! > > Mike > -- View this message in context: http://www.nabble.com/Can-someone-please-explain-%24%28%29---tf2630444.html#a7345154 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/