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 8859775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:08:28+00:00 2026-06-14T15:08:28+00:00

On getting no answer on my previous question , I decided to go on

  • 0

On getting no answer on my previous question , I decided to go on with this plugin structure.

(function ( $ ) {

$.fn.myPlugin = function (options) {
options = $.extend( {}, $.fn.myPlugin.defaults, options );
    return this.each(function (i, el) {
     ("someiD").live("click",function() {
            UpdateCounter();
        });

    });
};

$.fn.myPlugin.defaults = {
///options here for overiding
};
}(jQuery));

I have made a plugin in which I have to select a button to increase a counter and then I don’t know how to get the updated values of the counter that is OnSelect/OnClick of the button…. Can anyone give me any insights on how should I be dealing with this without changing my plugin structure?

  • 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-06-14T15:08:29+00:00Added an answer on June 14, 2026 at 3:08 pm

    Basically like this:

    (function ( $ ) {
      $.fn.myPlugin = function (options) {
        options = $.extend( {}, $.fn.myPlugin.defaults, options );
    
        // $(this) is your selected element, #someSelect in this case
        $(this).on('select', function(e) {
          console.log('selected!')
        })
    
    };
    
    // execute your plugin on the selected element
    $('#someSelect').myPlugin();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After getting fine answer to my previous question , I came across another problem.
I am currently getting started with SSE. The answer to my previous question regarding
This is with regard to previous question posted a while ago Remove -1 entry
Surprisingly I was only able to find one previous question on SO about this
I bet that I could find the answer of this question from reading similar
Note - I will really appreciate a quick and complete answer to this question.
This question is almost the same as a previous question , but differs enough
This question is related to a previous question of mine to which I couldn't
I hope I get an answer to my question this time, I already posted
I have asked a question like this before, and the answer was great but

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.