Created
          June 11, 2012 23:23 
        
      - 
      
 - 
        
Save getify/2913392 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var $options = $("<option></option>"); | |
| $options.add($("<option></option>")); | |
| $options.add($("<option></option>")); | |
| console.log($options.length); // 1 -- wtf? | |
| console.log($options.html()); // <option></option> -- again, wtf? | |
| // the documentation for jQuery#add seems to indicate this should work but it doesn't. Any ideas? | 
$options = $options.add(...)
thanks all!
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
adddoesn't seem to mutate the original collection—it creates a new one:Edit: Yep. Third paragraph in the docs: