phlco/img_carousel_js — pull request #4 by tjblonsk (2013-07-25 01:47:28+00:00)
Title: 70% complete

Couldn't get the picture to rotate on a click. Only one picture would shift.

This is the code :
next.onclick = function(event){
var carousel = document.getElementById("carousel").style.marginLeft;

if (document.getElementById("carousel").style.marginLeft = "0px") {
document.getElementById("carousel").style.marginLeft = "-612px";
}

else if (document.getElementById("carousel").style.marginLeft = "-612px") {
document.getElementById("carousel").style.marginLeft = "-1224px";
}
else {
document.getElementById("carousel").style.marginLeft = "0px";
}
};