Skip to content

Instantly share code, notes, and snippets.

@sohyl87
Last active December 18, 2015 16:49
Show Gist options
  • Save sohyl87/5814047 to your computer and use it in GitHub Desktop.
Save sohyl87/5814047 to your computer and use it in GitHub Desktop.
Create div & append to another div body using jQuery.
$('<div />', {
'class': 'clearfix',
html: "<section><img src='{source}' width='80'></section>"
}).appendTo('#foo');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment