I'm a guy used to mootools' way of chaining selectors, and I can't seem to find anywhere how to do the same in jQuery.
Suppose I have a select element in the selectObj
variable. What I need is to get the last option in that select.
In mootools I would have done something like:
var option = $(selectObj).getElement('nth-child(last)')
Can I do something similar, or what is the way of getting that last option
in jQuery?
PS. I know about the parent > child selector, but I can't really use it because I don't know what selector has been used to get the select
. I only have the resulting element.