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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:58:49+00:00 2026-06-10T03:58:49+00:00

I found a ToggleSwitch plugin that uses Jquery UI library but I can’t seem

  • 0

I found a ToggleSwitch plugin that uses Jquery UI library but I can’t seem to find a way to toggle the switch after init at runtime.

The plugin can be found here

With Jquery slider, one can simply force slider change through values option, ie:

$("#slider").slider('values', 0,100);

The configuration options include:

$(".selector").toggleSwitch({
  highlight: true, // default
  width: 25, // default
  change: function(e) {
  console.log("i changed my value")
 } // default: null
});

Any help is appreciated!

  • 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-10T03:58:50+00:00Added an answer on June 10, 2026 at 3:58 am
    <select id="on-off" class="ui-toggle-switch">
       <option selected="selected">ON</option>
       <option>OFF</option>
    </select>
    

    Create toggle switch on it:

    $("#on-off").toggleSwitch();
    

    To toggle – call “click” on label for option “off” (index = 1):

    $("div.ui-toggle-switch").find("label").eq(1).click();
    

    eq(1) here is index of option value (OFF). For ON it would be eq(0).
    Here’s fiddle with timeout to force “OFF” from code: http://jsfiddle.net/5ZSuw/

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

Sidebar

Related Questions

Found more than 10 tutorials to cursors but I can't understand that. My question
I found a simple JQuery accordion structure that uses DIV's rather than the typical
found this little code snippet that seems to do what i want, but im
Found a piece of code today, that I find a little smelly... TMyObject.LoadFromFile(const filename:
Found a bunch of other threads about comboboxes in WPF datagrid, but none that
Found this post Include namespace in Rails 3.1 console but it doesn't seem to
Found similar questions but nothing that covers exactly what I need. I kept it
Found this recently, but can't for the life of me figure out how the
Found some similar questions but no answers that work. Right now I am doing
Found table http://phrogz.net/programmingruby/language.html#table_18.4 but unable to find description for |= How the |= assignment

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.