Skip to content

Instantly share code, notes, and snippets.

@getify
Created June 11, 2012 23:23
Show Gist options
  • Select an option

  • Save getify/2913392 to your computer and use it in GitHub Desktop.

Select an option

Save getify/2913392 to your computer and use it in GitHub Desktop.
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?
@getify
Copy link
Copy Markdown
Author

getify commented Jun 11, 2012

thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment