Is this the right way to setup up an image within a link?
- by fire
$('<a />').attr({
'href': '#'
})
.append(
$('<img />').attr({
'id' : 'img',
'src' : 'edit.png'
}))
.appendTo('body');
Is the the "right way" to go about adding <a href="#"><img src="edit.png" id="img" /></a> to the body?
Also how would I add some css onto the img?