normalizing values to jQuery objects

normalizing values to jQuery objects

In jQuery UI we have lots of cases where we normalize various values to jQuery objects. Possible values are a jQuery object, DOMElement, array of DOMElements, selector, the string 'parent', the string 'clone', a function that returns a jQuery object. I've put together a function to handle this, but I'd like to see if anyone has any feedback about my solution or other possible values. If you have any thoughts, please post them on the thread at <a href="http://groups.google.com/group/jquery-ui-dev/browse_thread/thread/6a478b0118896672"> http://groups.google.com/group/jquery-ui-dev/browse_thread/thread/6a478b0118896672</a> which also contains a link to the code.


--