Query Index

I’ve been spending waaaay to much time trying to figure this out.

How do you get the index of the first element inside of a class.

var lastExpanded = $(".expandableText").index("ul:first");

So I have a div with a a few UL inside of them. The first case of UL would be 0 normally, but if I had another div before with a UL in it, then it would have a different index altogether. The only code I can find related to this talks about $(this) and I can’t get it to work.

http://brandonaaron.net/blog/2009/05/7/jquery-edge-versatile-index