Skip to content

Instantly share code, notes, and snippets.

@brianswisher
Created December 5, 2011 19:21
Show Gist options
  • Save brianswisher/1434871 to your computer and use it in GitHub Desktop.
Save brianswisher/1434871 to your computer and use it in GitHub Desktop.
Create a DOM element w/ jQuery
$('<div/>', {
id: 'myDiv',
title: 'my div',
text: 'This is my div'
}).prependTo('body');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment