My function returns empty. why?
<p>I know that this is a basic question but I am stuck with it somewhere in my code. I got that code from somewhere but now I am modifying it according to my need.</p>

<p>What does jQuery('#selector') do? In my code it always return empty.</p>

<p>Here is my code</p>

<pre><code>query: function (selector, context) {
            var ret = {}, that = this, jqEls = "", i = 0;
            if(context &amp;&amp; context.find) {
                jqEls = context.find(selector);
            } else {
                jqEls = jQuery(selector);
            }
            ret = jqEls.get();
            ret.length = jqEls.length;
            ret.query = function (sel) {
                return that.query(sel, jqEls);
            }

            return ret;
        }
</code></pre>

<p>when I call this query function then I pass selector as parameter. When I do <code>console.log(selector)</code> it does have all the selectors which I need in this function. But the problem is on this line <code>jqEls = jQuery(selector);</code>. when I do <code>console.log(jqEls)</code> after this it returns empty thus the whole function returns empty.</p>

<p>Can I use something different then this to make it work?</p>
