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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:25:07+00:00 2026-06-11T14:25:07+00:00

So basically, im working in a rollover with jquery. i have regular html wrap

  • 0

So basically, im working in a rollover with jquery. i have regular html wrap for a thumbnail with an image inside it. Then for the rollover i dynamically append a div(to animate the rollover later) and within that dynamically appended div, i want the alt text to appear as actual text on the screen. On rollout, it hides it.

here is the basic html

<div id="portSecW">

                <div class="portThumbsL">
                     <a href="images/sitePortThumbs/2882.png"><img src="images/sitePortThumbs/2882.png" alt="2882films"/></a>
                    <div class="thumbTxtSmall">2882FILMS</div>
                </div>

    </div>

and here is the javascript

$('#portSecW div:not(".closeXbtn")').prepend('<div class="portSecRollOver"><div class="portSecInner"></div></div>');


    $('.portThumbsL , .portThumbsR, .portSecRollOver, .portSecInner, h3').mouseover(function(){
        //$(this).css("background-color","#0099FF");//blue bg for thumgs
        $(this).children('.portSecRollOver').css("display","block");
        //$(this).children('.portSecRollOver').show();
        $(this).find('.portSecInner').html("<h3 class='h34roll'>" + $(this).find('img').attr("alt") + "</h3>");

    });
////    
    $('.portThumbsL , .portThumbsR').mouseleave(function(){
        //$(this).css("background-color","#333");
        $(this).children('.portSecRollOver').css("display","none");
        //$(this).children('.portSecRollOver').hide();
    });

​Now here is the problem, The problem is that although everything is working, on mouseout it sometimes gets stuck. messing about i found that if you roll over like normal, put the mouse on the text in the middle, and horizontally rollout(left/right) the appended div doesnt hide itself. It just stays on the screen. No matter what ive done, if you mouse over on the top side of the div or the bottom areas, it works, as soon as you mouse over where the text is, it gets stuck.

Heres a jsFiddle so you all can see whats going on. Again, mouseover the box and youll see text in the middle(fed by the alt tag), put the mouse there and roll out horizontally(left//right) and see how it just stays there. If you then mouse over it on the top/bottom parts then it behaves like normal.

In the above jQuery selectors, ive put EVERY selector within that box and ive tried them firstly, all by themselves, then all together as i have above and i just dont get thats messing me up.

Heres the the jsFiddle
http://jsfiddle.net/somdow/KSt6a/

Thanks in advanced.

​

  • 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-11T14:25:08+00:00Added an answer on June 11, 2026 at 2:25 pm
    $('.portThumbsL').hover(function(){        
        $(this).children('.portSecRollOver').css("display","block");
        $(this).find('.portSecInner').html("<h3 class='h34roll'>" + $(this).find('img').attr('alt') + "</h3>");
    }, function() {
        $(this).children('.portSecRollOver').css("display","none");
    });
    

    im not familiar with mouseover and mouseleave method, but for the same situation i use hover with the both handler in & out.

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

Sidebar

Related Questions

Basically, have a portfolio site I'm working on, with upwards of 15 pieces in
I am working on a window in which I basically have a listbox (formed
I am working on some code, basically I have a form. On that form
Basically I'm working on a model of an automated vacuum cleaner. I currently have
I've got a drag and drop UI basically working with jquery ui and backbone.js.
Im basically working on an image analyser that downloads images from another server. I
Basically I'm working on a website for a USB Drive manufacturer. I've used a
Hey guys was hoping you could help me out. basically i'm working on a
So basically this code was working fine before. I had some computer issues and
I'm working on a CMS basically because I want to learn how to build

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.