javascript: .scrollLeft(); - Method expression is not of function type
Hi there,
when I use the following jQuery javascript snippet in my code, the code works fine:
controlScrollLeft = $('#' + outerID).scrollLeft();
(controlScrollLeft variable keeps the pixels given by scrollLeft function).
BUT: An error is thrown in the javascript - editor: "Method expression is not of function type"...
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?
Thanks, Adrian.
Please sign in to leave a comment.
Hi Adrian,
It seems you haven't configured jQuery library in your project. Please follow these instructions.
Regards,
Konstantin
Hello,
thanks for your answer.
But I already configured it, at libriries jQuery UI 1.8.14 is activated, when I press on edit, http://jqueryui.com/demos is specified and loaded. Is there another documentation librires for scrollLeft?
Thanks, Adrian.
You should also enable jQuery library, as jQuery UI is designed to be used with jQuery, and scrollLeft method is defined in jQuery library, not jQuery UI.
Hello Konstantin,
yep, you were right, that helped. Now everything is fine.
Thank you a lot!
Sincerely, Adrian.