Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4614972
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:46:27+00:00 2026-05-22T01:46:27+00:00

I am attempting to change a plugin’s options, on the fly. But I cannot

  • 0

I am attempting to change a plugin’s options, on the fly. But I cannot find how that’s accomplished. Though, I’m positive I’ve seen it done before.

here’s a simple plugin with 1 option:

    <a href="javascript:void(0)" onclick="change_the_option(40)">click me</a>

    $(document).ready(function() {

        $(#menu).animateMenu({
            padding:20
        })

    });

function change_the_option(valchange){

 //somehow modify the option here, I'm guessing

}

That is loaded with the page, automatically. However, I may wish to change the padding option dynamically, without reloading the entire page.

Basically, if someone clicks a link or any selector I choose, I want to change padding:20 to padding:40, or whatever.

Does anyone have experience with modifying plugin options, on the fly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:46:28+00:00Added an answer on May 22, 2026 at 1:46 am

    If you haven’t already, have a look at

    http://docs.jquery.com/Plugins/Authoring

    from “Defaults and Option” on down to the end. Ideally you would want to be able to call your plugin passing some parameters to do what you want. For instance:

    $("#menu").animateMenu("padding","20")
    

    or

    $("#menu").animateMenu("update",{padding:20})
    

    Up to you exactly how you want it to work, but it should return the jquery object so that it ca be properly chained. This is all explained in the above link.

    But in this way, you could have nice clean code, that you could chain along with other jquery, like so:

    $("#menu").animateMenu();  // initialize the menu
    
    // ... do other stuff
    
    $("#menu").animateMenu("update",{padding:20}).css("color","red");
    
    // ... etc.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to port over an Internet Explorer plugin to Firefox, but I'm not
I'm attempting to use the Super Inplace Controls plugin, which has an in_place_select method.
I have a web application that's currently running under Tomcat 5.5.25. I'm attempting to
I'm attempting to build a way for my selectors to 'listen' to 'global' events
Note: This is for a shop that works in C++, C++/CLI, and C# with
I am attempting to get full path of a selected node in the package
I'm attempting to deserialize a custom class via the XmlSerializer and having a few
I am working on an SDK. The goal of the SDK is to unify
My current JDK on Mac OS (10.6) is set to 1.6 and I'd like
When dropping the use of rspec and rspec-rails plugins and switching to the gem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.