title: selector with square brackets isn't returning object
body: <p>In HTML I have: </p>
  
  <pre><code>&lt;div class="jqtree-element" node-id="5"&gt;` 
  </code></pre>
  
  <p>and in JS I have:</p>
  
  <pre><code>for(var i=1;;i++){
    var object = $('div.jqtree-element[node-id="i"]');
    if(object.length === 0){
      var id = i;
      break;
    }
  }
  </code></pre>
  
  <p>(I'm looking for free id)</p>
  
  <p>I don't know, why it only returns <code>object = [prevObject: r.fn.init(1)]</code></p>
  
  <p>Any idea?</p>