I want to create and append an item in jquery, while saving a reference to it.
var buy = "<img src='img/buy-now.png' />";
var $buy = $(buy).appendTo("body");
$buy.html("hello");
I was expecting something like the above to work. Any ideas?