Indeed, when you use attr, you will need to change the image from div to img.
Another way would be to use the css background-image in which case you can keep the div.
sym.$('elementName').css({'background-image':'url("images/imageName.jpg")'});
Indeed, when you use attr, you will need to change the image from div to img.
Another way would be to use the css background-image in which case you can keep the div.
sym.$('elementName').css({'background-image':'url("images/imageName.jpg")'});