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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:12:50+00:00 2026-05-23T14:12:50+00:00

I am new to stackoverflow and Jquery so I would like to apologize for

  • 0

I am new to stackoverflow and Jquery so I would like to apologize for my inexperience/naivety in advance.

So essentially I am attempting to make a div appear when a button is in the mouseEnter state.

Here’s my attempt at Jquery…

$('#main-button-btn-cart').bind('mouseenter', function() {
    var $select_button = $('#select-product-reminder');

    $select_button.style.display = 'inline-block';
});

and the HTML is…

  <div id="select-product-reminder" style="width:200px; height:30px; background-color:#F00; display:none;">Please Choose an Item</div>
    <button type="button" id="main-button-btn-cart" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="productAddToCartForm.submit()">
      <?php echo $this->__('+ADD TO CART') ?>
    </button>

For some reason this code does not work. However, it may be useful to note that if I include an alert box in my bind function, the alert box does appear.

Thanks in advance for any input!

  • 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-23T14:12:51+00:00Added an answer on May 23, 2026 at 2:12 pm

    This should do the trick;

    $('#main-button-btn-cart').mouseenter(function() {
        var $select_button = $('#select-product-reminder');
        $($select_button).css('display','inline-block');
    });
    

    Or you could do away with the var;

    $('#main-button-btn-cart').mouseenter(function() {
        $('#select-product-reminder').css('display','inline-block');
    });
    

    Update for click;

    $('#main-button-btn-cart').mouseenter(function() {
      $('#select-product-reminder').css('display','inline-block');
      $(this).click(function() {
        alert('You clicked the button');
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following JQuery code which does similar functionality like Stackoverflow where the
I'm playing a little bit with the new StackOverflow API . Unfortunately, my JSON
Hi i am new to stackoverflow. I am developing an xmpp client application for
I'm new here to stackoverflow, so bear with me. I have a book that
Brand new poster here on StackOverflow. I've been reading and learning here for some
I'm new to SubSonic (and stackoverflow!) and I just wanted to leave a quick
I am new to IntelliJ (and Stackoverflow) and fairly new to Java,In my application
I'm new to programming and stackoverflow and have decided to start by learning objective
I am new to both MVC and Stackoverflow I am trying to implement pagination
Hello StackOverflow Users, I am new to android and trying to develop a game

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.