I want to display an image but with code like this:
HTML:
<a href="javascript:" class="menuin" from="account.png"></a>
<a href="javascript:" class="menuin" from="home.png"></a>
Jquery:
$(".menuin").html('<img src="img/'+$(this).attr('from')+'">');
I have a trouble on jquery code. I think that is wrong code. I want to display an image according to from attribute. can you help me please?
.htmltakes a callback function as it's parameter - see @Satpal's answer below