0

Is it possible to change a jquery function's parameter with another jquery function?

What I have is this (stripped down):

$(".jThumbnailScroller").thumbnailScroller({
        scrollerType: "hoverPrecise"
});

And I'm wondering if I can change scrollerType: "hoverPrecise" to "clickButtons" via another function that gets called after detecting mobile?

Thanks!

2
  • 4
    That completely depends on how the plugin works. Check their docs for a change method, or submit a pull request. Commented May 31, 2013 at 22:19
  • You should at least link to the plugin. Are you sure it does not have documentation? Commented May 31, 2013 at 22:26

1 Answer 1

1

Have you at least try:

$(".jThumbnailScroller").thumbnailScroller('option','scrollerType','clickButtons');
Sign up to request clarification or add additional context in comments.

1 Comment

Yes, this is how many jqueryui (if not all) plugins work, they let you change specific options after it is called. It would be wise for the author of the plugin to do the same thing. If not, then why can't you detect if it is mobile FIRST, and then change your parameter?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.