Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript relative jquery selector? Re: relative jquery selector?

#76939
schedal
Member

thanks, eq(1) works if the order of the divs is always going to be the same, but this is not a very good idea when thinking about scalability of a website and the potential for new properties/fields to be added to a site.

Instead, I found out I could use:

Code:
$(this).siblings(“.views-field-nid”).show();

So I am calling the class name, not a relative sibling, which is what I needed. Yaay!