smpily — 2011-03-08T14:37:30-05:00 — #1
Hey so I am struggling with this little bit of code and I am hoping that someone out there could tell me if I am wrong or why it wouldn't work
var pos = document.getElementById('image_control').scrollLeft+=900;
paul_wilkins — 2011-03-08T16:35:14-05:00 — #2
Here's the structure of that assignment.
var foo = bar += 900;
Both foo and bar will be updated to the increased value.
Do you really want to make a change to the scrollLeft property of that element?
Should the += be just a + instead?