I have a listbox which (sometimes) uses OptionGroups as well, meaning that if I select the parent of a certain OPTION in my listbox, as follows:
var optionGroup = $(this.options(index)).parent();
it can either be an OptionGroup (if they're used), or the Select element itself.
Is there an easy way of determining which kind of object I'm dealing with here?