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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:44:05+00:00 2026-06-03T02:44:05+00:00

$(function() { $(.popup).hide(); $(.clickMe).mouseover(function () { $(.popup).show(); }).mouseout(function() { $(.popup).hide();//Set this to default hide

  • 0
$(function() {
    $(".popup").hide();
    $(".clickMe").mouseover(function () {       
        $(".popup").show();
    }).mouseout(function() {
        $(".popup").hide();//Set this to default hide
    }); 
});

<script type="text/javascript"src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>

<a class="clickMe" href="#"> Click here to see hidden item.</>
<div class="popup"> You've found me! </div>

I found this code that i would love to implement but unsure how. Instead of mouseover, how can i set it to onclick call instead? Thanks for your time.

  • 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-03T02:44:06+00:00Added an answer on June 3, 2026 at 2:44 am

    This would do it

    $(function() { 
      $(".popup").hide();                 //Hide the popup first
      $(".clickMe").click(function () {   //Attach a click event to the .clickMe
            $(".popup").toggle();              //Toggle the visibility of the popup
      });
    }); 
    

    So all i’ve done is change the mouseover and mouseout events for a single click event for the element with a class of .clickMe. Then used a jQuery toggle effect which will show or display the div depending on whether it is already visible, hence ‘toggle’ the div. Look here for more info

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

Sidebar

Related Questions

i Showing a progress Bar as a Modal Pop Up.for this i <script type=text/javascript
I am trying to open a popup like this: $('#btn').click(function () { var popup
I have the following jQuery which I need adapting: $(document).ready(function(){ $(.rss-popup a).hover(function() { $(this).next(em).stop(true,
I am looking to create a JavaScript function that will display a confirmation popup
The jquery popup I created using the jquery show function, fades away in few
Possible Duplicate: How to show/hide a div on mouseover using jquery? I have a
I was needing a popup that should be decided with a javascript function. I
I have a popup function in a program that works well, be re-loads the
Previously,I used the window.showModalDialog() function to popup a window: window.showModalDialog(myHtml) In myHtml,there are some
$.getJSON('ajax_popup.php', function(data) { var popupDiv = decodeURIComponent(data.data); $('body').append( popupDiv ); }); This piece of

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.