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

  • Home
  • SEARCH
  • 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 1040711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:15:28+00:00 2026-05-16T15:15:28+00:00

Is it possible to stop a jQuery function with a checkbox (on/off)? Any examples

  • 0

Is it possible to stop a jQuery function with a checkbox (on/off)? Any examples out there?

  • 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-16T15:15:28+00:00Added an answer on May 16, 2026 at 3:15 pm

    Try this:

    http://jsfiddle.net/nNREP/1/

    There’s no magic to this…you’re simply testing in the script if your checkbox is checked. If you would also like to cancel termination of, for example, a link when it’s clicked (the link’s click event) or a form’s submission (the form’s submit event), simply return false for those specific events like this:

    $('#myForm').submit(function(e) {
        if (!$('#mycheck').is(":checked")) {
            return false;
        } else {
            //do something...or nothing...whatever...
        }
    });
    

    Edit: Your tiptip plugin doesn’t appear to have an option to conditionally terminate the script. You can get around this by doing one of two things….adding a few conditional lines in the plugin or automatically disabling the plugin when the checkbox is unchecked (this is probably going to be comparatively CPU intensive). So let’s focus on the first option…

    When you set up your tiptip plugin, put in something like this:

    $(".someClass").tipTip({maxWidth: "auto", edgeOffset: 10, enter: myFunction});
    

    That myFunction will be called at the very start of the “active_tiptip”, before anything else happens. Go to line 101 of the plugin’s source code and you can see how it’s being called. I found this by searching the document for the word “enter”…I found two instances…one when the property is originally being established with an empty function on line 35 and one at the beginning of the active_tiptip() function. Now, if you want to be able to use that myFunction to either cancel or not cancel the execution of the script, change line 101 in the tiptip.js from this:

    opts.enter.call(this);
    

    To this:

    if (!opts.enter.call(this)) {
        return false;
    }
    

    Then create your myFunction that does this:

    function myFunction() {
        return $('#mycheck').is(":checked");
    }
    

    And so, myFunction will return true when checked and false when not. If false, it will halt the execution of the active_tiptip() function, thereby making sure your tooltip doens’t pop up.

    That’s about as deep as I’m willing to go for this. The rest you can figure out for yourself.

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

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer if (managerStyle & DSNavigationManagerStyleDefaultNavigationBar || managerStyle & DSNavigationManagerStyleDefaultToolBarBit) { //… May 16, 2026 at 4:31 pm
  • Editorial Team
    Editorial Team added an answer The answer to your question is that you don't give… May 16, 2026 at 4:31 pm
  • Editorial Team
    Editorial Team added an answer Placing Thread.Sleep in an asynchronous method can contribute to ThreadPool… May 16, 2026 at 4:31 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Possible Duplicate: jQuery: How to stop AJAX function escaping JSON string used to POST
Is it possible to stop the automatic preventDefault() from applying in a simple Jquery
I'm using this plugin: http://www.fyneworks.com/jquery/star-rating/ Is it possible to put a click function inside
I have a jQuery function that is running on setInterval(); What I want to
Possible Duplicate: javascript: pause setTimeout(); Im using jQuery and working on a notification system
I have a click function bound to many elements. It is possible that sometimes
I have a start and stop textbox field which triggers jquery calendar. I want
I am building a common function library but the functions inside need to reference
According to the developer documentation jquery plugins are supposed to have only one namespace
I have 1 problem , I've taken one jquery plugin (filter on table). This

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.