When I type out the following code:
$(‘.whatever’).html(“LOL”);
It works. But in the website I’m building I need to add more than just a string.
This is what I wish to add:
<div class="pic"><img class="left" src="img/happy-man.jpg"/ ></div>
<div class="pic"><img class="happy" src="img/happy-woman.jpg"/ ></div>
<div class="pic"><img class="right" src="img/happy-celeb.jpg"/ ></div>
But nothing happens when I put the HTML code above into the html() function. I’m wondering what obvious mistake I’m doing in regards to the syntax. Appreciate it!
The following code will allow you to replace the html contents of the div
or you just make a string