Hey,
I have function where it creates img element and sets id = title,
When i add to index.html jquery
it doesn't work, why?
Jscript function:
Thank you!
I have function where it creates img element and sets id = title,
When i add to index.html jquery
Code:
$('#title').click(function() {
alert('xx');
});
Jscript function:
Code:
function showUploadedItem (source) {
var list = document.getElementById("image-list"),
li = document.createElement("li"),
ip = document.createElement("input"),
img = document.createElement("img");
bild = document.createElement("img");
bild.src="pencil.png";
bild.style.width="16px";
bild.style.height="16px";
bild.style.cursor="pointer";
bild.style.border="0";
bild.id="title";
img.src = source;
li.appendChild(img);
list.appendChild(li);
li.appendChild(ip);
li.appendChild(bild);
}
Thank you!
Comment