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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:34:45+00:00 2026-06-13T23:34:45+00:00

I need to create a jQuery based carousel. On hovering over a carousel item

  • 0

I need to create a jQuery based carousel. On hovering over a carousel item it should bring up a related popup div just above it.

This popup div needs to be positioned to appear outside of the carousel wrapper, but still maintain the position along the x-axis above the hovered carousel item. As a result, I have placed the popup div inside the carousel item so it can be absolutely positioned with minus top attribute in the CSS but relative to the carousel item.

I have run into a problem where overflow:hidden needs to be applied to the carousel so it doesn’t show all the carousel items on page load, but this will cut off the popup div when it needs to appear on hover.

In the CSS on the carousel wrapper I have tried using the following, but this has not worked, it just ended up behaving like overflow: hidden

overflow-x: hidden;
overflow-y: auto;

or

overflow-x: hidden;
overflow-y: visible;

I have provided an example is JSFiddle using caroufredsel plugin. In this example I have made the example popup div visible at all times rather than hover for clarity sake. You can see the text and a top of the red div gets cut off.

http://jsfiddle.net/melon/jRp2r/9/

One solution that came to mind, was to have the popup divs marked up outside of the carousel wrapper which would solve the problem of it being cut off. But then comes the problem in figuring out where to position/show it relative to the carousel item being hovered and also which item was being hovered. I wanted to see if there were any other ideas, perhaps better ones before I go down this path.

If someone could give me any direction to achieve the goal I have outlined, whether via CSS or perhaps some custom JS that would be great.

Thanks in anticipation.

UPDATE:

The accepted solution meant that if the carousel was in the middle of the page, the popup div would not stay in the same position along the Y-axis when scrolling the page.

I had amalgamated my initial solution with the accepted answer. I created a separate div outside of the carousel where I would fill it in with the popup HTML of the hovered carousel item. Then I would use the Jquery to absolutely reposition this. The following code example solved my problem eg:

$('.carousel_item').mouseenter(function() {
   var $this = $(this);
   var posLeft = ($this.offset().left);
   var posTop = ($this.offset().top);

   //Pop up height
   var popHeight = ($('.popup', this).height());

   //Turn into negative number
   posTop = Math.abs(popHeight) * -1;;

   var popup_html = $('.popup', $this).html();

   $('#outside_popup').html(popup_html).css({
       top: posTop,
       left: posLeft
   }).fadeIn('fast');

}).mouseleave(function() {
     $('#outside_popup').fadeOut('fast');
});
  • 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-13T23:34:46+00:00Added an answer on June 13, 2026 at 11:34 pm

    I had to do something similar once myself. I’m sure somebody here will come up with a better solution but this is how I went about it:

    Nest your pop up with the slide:

    <div class="slide">
        <div class="slide_content"></div>
        <div class="popup">Hello!</div>            
    </div>
    

    On mouse over, get the position of the slide. Set the position of the popup relative to the hovered slide. position: fixed; is key here. Then make it appear:

    $('.slide').mouseenter(function() {
        var $this = $(this);
        var posLeft = ($this.offset().left)-10
        var posTop = ($this.offset().top)-10
        $('.popup', $this).css({
                                position: 'fixed',
                                top: posTop,
                                left: posLeft
                               }).fadeIn('fast');
    
        }).mouseleave(function() {
            $('.popup', this).fadeOut('fast');
        });
    

    Click here for a VERY basic example
    ​
    Tested in IE7-9, Firefox, Chrome

    EDIT: Here is a working example of your code

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

Sidebar

Related Questions

I need to position a div over an image with jQuery. I can create
I need to create a web application using ASP.NET MVC, jQuery and web standards
I need to create a random number of dropdownlists in my view, based on
I need to create a table with just 1 column containing times (starting from
I'm using JQuery to create a Horizontal Accordion menu (based on the tutorial at
I need help to extend a jquery script on this page to create a
I need to create multiple divs like below based on how many objects are
I am trying to create a jQuery based style switcher which changes the body
I need to make this jquery run much faster, I did not create all
I need to create a simple web-based expense calculator. We're using asp.net web forms,

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.