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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T03:11:59+00:00 2026-05-17T03:11:59+00:00

How do I bind events to a jQuery UI Toggle button? More specifically, how

  • 0

How do I bind events to a jQuery UI Toggle button? More specifically, how can I bind events that are going to fire?

The checkboxes are rendering to toggle buttons correctly, but any event handlers attached to them are not triggered when the state of the button changes. Is there something I’m missing?

CSS:

<input type='checkbox' id='recording'/> <label for='recording'> Recording </label>

JavaScript:

$('#recording').button() // works
    .click(fn)           // doesnt work
    .changed(fn)         // doesnt work
    .toggle(fn, fn2)     // doesn't work
  • 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-17T03:12:00+00:00Added an answer on May 17, 2026 at 3:12 am

    Assuming that there’s nothing particularly odd about the jQuery-UI toggle buttons:

    $('#recording').live('click',
    function() {
    // the stuff you want to do when the future-created buttons are clicked
    });
    

    Documentation, from http://api.jquery.com/, on the live event-handler.

    In place of ‘click’ you can also use:

    • (jQuery 1.3.x) ‘dblclick’, ‘keydown’, ‘keypress’, ‘keyup’, ‘mousedown’, ‘mousemove’, ‘mouseout’, ‘mouseover’ and ‘mouseup’
    • (jQuery 1.4.1) all the above, plus: ‘focus’, ‘blur’ and ‘hover’.

    See the http://api.jquery.com/live/ reference for full details.

    As @Peter Ajtai noted (in comments):

    If you list all the events you can bind, you should also list custom events and that you can include multiple events by leaving a space between each pair of events.

    (Emphasis mine)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can I add a wild card into this jquery bind event so that
I'm not able to bind events to a list that is generated by jQuery.
Possible Duplicate: Bind multiple events to jQuery 'live' method I have the following function:
There are various ways to bind events to elements in jquery .click , .bind,
Using jQuery on() version 1.7. I bind my events usually like this: $(.foo).on(click, function()
I can bind a jquery event to this element like: <script type=text/javascript> $('#new_key').ready(function() {
With jQuery you can bind functions to an event triggered on a DOM object
Can Internet Explorer bind events to absolute positioned elements ? I can't bind a
This is how to bind multiple events on a couple jQuery selectors: $('#selector1,.selector2').bind('event', function
In jQuery you could use .live() , .on() , and .delegate() to bind events

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.