开发者

how to find anchor tag in a div and push it to an array using jquery

how to find anchor tag in a div and push it to an array usin开发者_如何学运维g jquery. i tried it but my result shows arry=[jquery(a1,a2,a3,a4,a5)] and if i tried to check the array length it shows only one but not 5. please help. Iam getting the anchor tag by $(el).find('a');


There is a toArray method for jQuery objects. These method wil convert the jQuery result to a normal array:

$(el).find('a').toArray();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜