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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:01:23+00:00 2026-05-20T15:01:23+00:00

I create a jQuery Tool’s Overlay on a trigger as such: $(‘button’).overlay( { …

  • 0

I create a jQuery Tool’s Overlay on a trigger as such:

$('button').overlay(
{
 ... 
});

How can I disable and re-enable the overlay later on ? I want my $('button') element to remain as a link, but instead of displaying the Overlay on click, I want to show an alert ?

Something like that :

if( needToDisableOverlay() )
{
   $('button').overlay().disable(); // no such thing...
   $('button').bind( 'click.alert', function()
   {
      alert( 'The overlay has been disabled' );    
   });
}
// later on
if( needToEnableOverlay() )
{
    $('button').unbind( 'click.alert' );
    $('button').overlay().enable(); // no such thing...
}

I know I can use

$('button').unbind('click');

to remove all click handlers from the button (including the Overlay load() function), but I don’t think this is a clean way of doing it especially if I have other click handlers I want to maintain.

Maybe I can use flag in the Overlay’s onBeforeLoad handler and return false if the flag is set ?

What is the proper of achieving this ?

  • 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-20T15:01:24+00:00Added an answer on May 20, 2026 at 3:01 pm

    Answering my own question:

    Maybe I can use flag in the Overlay’s onBeforeLoad handler and return false if the flag is set ?

    This works nicely, and looks clean. No unbinding required.

    I guess I should have tried before posting — then again, maybe this will help other people in the future 😉

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

Sidebar

Related Questions

I DO NOT WANT TO CREATE A JQUERY PLUGIN Let's say I have something
I want to create List of Grouped Checkboxes as follows: []Group1 [] Item1 []
I'm trying to create a jQuery plugin and having problems with selecting the DOM.
Hi I am trying to create a jquery popup bubble for items created in
I'm using jquery datepicker(). In my index, I'm looping over: @tasks using a partial
I need some help with some dynamic jQuery - if thats what it would
I am building a web application in which I would like to include the
hellp guys, I've been working on ajax recently, and I have a problem in
2021 update Today I'm using Ansible for this and other devops tasks. Along the

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.