Figured i would post a message i got from another user just in case someone else had the same question:
Any idea how I can get the last select in the array. I have elementSelect which is the current div.select-box , I need the last select. With something like
var lastselect = myselect[myselect.length - 1];
The get_options method handles selectors as an argument, so:
- selectBox.get_options('li:last-child');
will return just the last option element. I'm thinking there should be an easier way to do this though, maybe it would be wise to prefix all arguments with 'li:' so that you only have to do something like:
-
- selectBox.get_options('last-child');
- selectBox.get_options('first-child');
- selectBox.get_options(5);
-
so if the argument (or a list of arguments should be accepted, yes?) is an integer, just return that child, or something?
Censorship that comes from the outside assumes about people an inability to make reasoned choices -- George Carlin