Skip to content

Instantly share code, notes, and snippets.

@tsevdos
Created January 2, 2012 12:07
Show Gist options
  • Save tsevdos/1550446 to your computer and use it in GitHub Desktop.
Save tsevdos/1550446 to your computer and use it in GitHub Desktop.
Convert a jQuery object to raw DOM object
var myDiv= $('div')[1]; // myDiv is a raw DOM object
alert(myDiv.innerHTML) // and we can do all the normal things with it
var myDiv= $('div').get(1); // myDiv is again a raw DOM object
alert(myDiv.innerHTML) // and we can do all the normal things with it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment