是否有任何将[$(div), $(span), $(li)]
转换为$(div, span, li)
的优雅方法?
Is there any elegant way of turning [$(div), $(span), $(li)]
into $(div, span, li)
?
我需要的是一组由jQuery包装的元素,而不是一组jQuery元素.我想用尽可能少的代码行做到这一点,并且循环最少(如果有的话).
What I need is a jQuery-wrapped set of elements instead of an array of jQuery elements. I would like to do this in as few lines of code as possible, and with minimal (if any) looping.
编辑:对于那些对此问题感到困惑的人,可以使用console.log在已已选择的元素数组上从firebug复制并粘贴此代码.
For those of you confused by this question, this code is copied and pasted from firebug using console.log on an array of elements that have already been selected.