Skip to content

Instantly share code, notes, and snippets.

@unknownuser88
Created January 6, 2014 15:55
Show Gist options
  • Save unknownuser88/8284854 to your computer and use it in GitHub Desktop.
Save unknownuser88/8284854 to your computer and use it in GitHub Desktop.
jQuery create element
jQuery('<div/>', {
id: 'foo',
href: 'http://google.com',
title: 'Become a Googler',
rel: 'external',
text: 'Go to Google!'
}).appendTo('#mySelector');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment