I thought this would be simple. I am changing an image in div but I can’t seem to set the id of the image of the div.
var my_html = "<img src=\"/img/lock.png\" id=\"" + json_obj.ITEM_VALUE_ID "+ \" />"
$("#up-down-icons-"+id+"-"+level).html( my_html );
I get
<img id=" + json_obj.ITEM_VALUE_ID + " src="/img/lock.png">
json_obj.ITEM_VALUE_ITEM is defined. Can anyone see what I am doing wrong? I think I just need a second pair of eyes.
thanks
You have an error in your javascript syntax, This is a good way :