controlScrollLeft = $('#' + outerID).scrollLeft();
(controlScrollLeft variable keeps the pixels given by scrollLeft function).
Ok, so when I remove the brackets (), like: controlScrollLeft = $('#' + outerID).scrollLeft;
Then, no error is thrown, but the function does not work anymore.
Where is my mistake?