Hello all I am working in html5 and JavaScript and I am stuck in a problem
So I have div which I am dynamically appending like this
container.append('<div id=del_' + container_id + ' style = " background-image: url(' + "del_btn.png" + ') no-repeat center center;"/>');
My div is created but I am unable to see the background image can any one guide me what is the mistake.
Thanks
You said that it is in the same folder as the javacript files.
If for example your JS files reside in a different folder than the html page, say
scriptsyou would need to modify the image path too to something like
'scripts/del_btn.png'