Hi, Rayn :handshake: :o) I think, for shorthand notation (some say for readability, but I think otherwise), some set var's (variables) to represent pieces of code, for instance:
var mySet = '$(mySet)' and then use it as: mySet.find(':text')... Written in "longhand", it would be: $('mySet').find(':text')... When trying to read someone else's code, where this shorthand is use extensively, I just find it hard to decipher, since I have to trace all the var's down to find out what they stand for... Someone please correct me if I'm wrong... Rick -----Original Message----- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of ggerri Sent: Thursday, March 05, 2009 7:31 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Simple one: difference between varXy.find(':text') and $(varXy).find(':text') Thanks Ryan :handshake: so mySet.find(':text').each(...) would be right and $(mySet).find(':text').each(...) not? :confused: In examples I often see (within an each function): $(this).something but also this.something Still dont get the difference of use :,( G ryan.joyce...@googlemail.com wrote: > > > mySet is an object or variable, $(mySet) will try to get an element > using the contents of mySet as the selector. > > On Mar 5, 10:04 am, ggerri <gerald.ressm...@ewz.ch> wrote: >> Hi there >> >> thats an easy one for you ;-) >> >> if i do: >> >> var mySet = $('tr>td:nth-child(2n)'); >> >> how do I use mySet? What's the difference between >> >> mySet.find(':text') >> >> and >> >> $(mySet).find(':text') >> >> Thanks :-)) >> GGerri >> >> -- >> View this message in >> context:http://www.nabble.com/Simple-one%3A-difference-between-varXy.find%28%... >> Sent from the jQuery General Discussion mailing list archive at >> Nabble.com. > > -- View this message in context: http://www.nabble.com/Simple-one%3A-difference-between-varXy.find%28%27%3Atext%27%29-and-%24%28varXy%29.find%28%27%3Atext%27%29-tp22348597s27240p22350689.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.