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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:06:34+00:00 2026-05-15T06:06:34+00:00

I have a jquery overlay window in my html alongwith a button to activate

  • 0

I have a jquery overlay window in my html alongwith a button to activate here is the code.

<!-- Validation Overlay Box -->
<div class="modal" id="yesno" style="top: 100px; left: 320px; position: relative; display: none; z-index: 0; margin-top: 100px;">
    <h2>  &nbsp;&nbsp;Authentication Failed</h2>

    <p style="font-family:Arial; font-size:small; text-align:center">
       Ether your username or password has been entered incorrectly.
       Please make sure that your username or password entered correctly...
    </p>

    <!-- yes/no buttons -->
    <p align="center">
        <button class="close"> OK </button>
    </p>
</div>

Here is the Jquery tools Script

<SCRIPT>
$(document).ready(function() {
    var triggers = $(".modalInput").overlay({
        // some mask tweaks suitable for modal dialogs
        mask: {
            color: '#a2a2a2',
            loadSpeed: 200,
            opacity: 0.9
        },
        closeOnClick: false
    });

    var buttons = $("#yesno button").click(function(e) {
        // get user input
        var yes = buttons.index(this) === 0;

        // do something with the answer
        triggers.eq(0).html("You clicked " + (yes ? "yes" : "no"));
    });

    $("#prompt form").submit(function(e) {
        // close the overlay
        triggers.eq(1).overlay().close();

        // get user input
        var input = $("input", this).val();

        // do something with the answer
        triggers.eq(1).html(input);

        // do not submit the form
        return e.preventDefault();
    });

});
</SCRIPT>

And here how its called upon clicking on a button or a hyperlink

"<BUTTON class="modalInput" rel="#yesno">You clicked no</BUTTON>"

All i want is I dont want to show the overlay on clicking on button or through a link. Is it possible to call it through a javascript function like “showOverlay()” ??

  • 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-15T06:06:35+00:00Added an answer on May 15, 2026 at 6:06 am

    You have 2 options, there’s a load option you can use, like this:

    var triggers = $(".modalInput").overlay({
     mask: {
      color: '#a2a2a2',
      loadSpeed: 200,
      opacity: 0.9
     },
     closeOnClick: false,
     load: true
    });
    

    This makes it open immediately, you can see the API demo here. If what you’re after is to just show the overlay at some point later after setting it up, just trigger the event it’s bound to, click, like this:

    $(".modalInput").click();
    

    This triggers the same handler behavior as actually clicking a button or link would, opening the overlay.

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

Sidebar

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.