Pejman
Pejman

Reputation: 2636

jQuery object array get an item as jQuery object

I have an array contains jQuery selectors :

var aa = $('a');

when this line fires, contains of aa is an object array filled with [object HTMLAnchorElement], now I want to get an object from aa as a jQuery object without using this :

var mynewelm = $(aa[index]);

Is that even possible ?

I DO KNOW I CAN USE SPECIFIC SELECTOR TO GET THAT OBJECT AS JQUERY OBJECT BUT I HAVE TO USE aa.

Upvotes: 0

Views: 61

Answers (1)

Jason P
Jason P

Reputation: 27012

Use eq():

var mynewelem = aa.eq(index);

Upvotes: 1

Related Questions