Created
March 8, 2017 23:51
-
-
Save codyogden/ba3c6c9988b5ada63fd73b32511cf37f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Append an image to a div and a div to the body | |
$(document).ready(function(){ | |
var myDiv = $('<div />'); | |
myDiv.addClass('cardDiv'); | |
var myImg = $('<img />'); | |
myImg.attr('src', 'http://placehold.it/150x150'); | |
myImg.addClass('cardImg'); | |
myDiv.append(myImg); | |
$('body').append(myDiv); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment