fjgandrade / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

Patch for /trunk/SharpKit.jQuery-1.5.2/jquery-1.5.2.cs #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is valid jquery js code:

var div $("#elementid");
var divEl = div[0]; //for example, get first element.

Greetings,
Sebastian

Original issue reported on code.google.com by sebastia...@gmail.com on 5 Aug 2011 at 12:51

Attachments:

GoogleCodeExporter commented 9 years ago
Although I know that this works, I never found official documentation for this 
api. As far as I know, you should use the get(index) method

http://docs.jquery.com/Get#.get.28.29_-_DOM_manipulation

Original comment by DanelK...@gmail.com on 5 Aug 2011 at 1:18

GoogleCodeExporter commented 9 years ago
Hey dan-el,
Here's a very official documentation for this ;)
http://api.jquery.com/get/

Quote:
Each jQuery object also masquerades as an array, so we can use the array 
dereferencing operator to get at the list item instead:

alert($('li')[0]);

Greetings,
Sebastian

Original comment by sebastia...@gmail.com on 5 Aug 2011 at 5:45

GoogleCodeExporter commented 9 years ago

Original comment by DanelK...@gmail.com on 6 Aug 2011 at 3:57

GoogleCodeExporter commented 9 years ago

Original comment by DanelK...@gmail.com on 26 Nov 2011 at 9:13