So I've got this:
var Indent =
{
init: function()
{
var foo = document.getElementsByTagName("img");
for (i=0,ii=4; i<ii; i++) {
foo[i].onclick = foo[i].style.setAttribute("marginLeft", "10px");
}
},
};
Indent.init();
The four images that I want to apply this effect to are the first 4 in the document so hopefully you can see my thinking here.
Any ideas as to why this isn't working?
Thanks in advance :)


Sign In
Create Account


Back to top









