yerassyl yerassyl - 4 years ago 161
jQuery Question

Select element inside other matched set of elements in JQuery

Suppose I have following selector:

var slots = $('').parent().siblings();

which gives me this result:

[div.col-xs-3.col-sm-3.col-md-2, div.col-xs-4.col-sm-4.col-md-4.slots-go-here, prevObject: m.fn.init[1], context: document]

What I need is to select
I tried to access it with
index, however it returns raw HTML. Later I need to call
on my selection. How can I do that?

Answer Source

$.siblings can take a selector. see docs.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download