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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:58:47+00:00 2026-05-23T13:58:47+00:00

The title is self explanatory, here is what I have so far, but the

  • 0

The title is self explanatory, here is what I have so far, but the background color always stays grey on mouseout, instead of pink on qtip hover:

$().ready(function() {
$("#openDiv").mouseleave(function (e) {
var used_classes = ['qtip'];
var $c = $(e.relatedTarget).attr('class');

if ($c=='qtip')
  {
   $("#openDiv").css('background-color', 'pink');
  } else{
   $("#openDiv").css('background-color', 'grey');
  }
 });
 });

http://jsfiddle.net/bUzPG/21/ with complete setup. This is driving me crazy!
Any answer that solves this issue will be marked as the answer.

  • 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-23T13:58:48+00:00Added an answer on May 23, 2026 at 1:58 pm

    what I see is that the event fires when the mouse leaves ‘#openDiv’ , and then e.relatedTarget would be whatever you’re entering when you leave, which is nothing.
    If what you want is for the main div to go pink when hovering over qtip, you should be using .hover (or .mouseenter to set it pink) on the qtip, like simply…

    $(".qtip").hover(
      function() {
        $("#openDiv").css('background-color', 'pink')
      },
      function() {
        $("#openDiv").css('background-color', 'white')
      }
    )
    

    I see that the qtip thing seems to be created after the DOM ready, so you might want to use .live instead…

    $(".qtip").live('mouseenter', function() {
        $("#openDiv").css('background-color', 'pink')
      })
      .live('mouseleave', function() {
          $("#openDiv").css('background-color', 'white')
        }
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Title is quite self explanatory, but I have some animation being done in a
Title is self-explanatory. I have a good bit of experience with PHP, but I
The title is pretty self-explanatory, but here's a simplified example: #include <cstdio> template <typename
The title of this question should be self explanatory, but basically I have this
I hope the title is self explanatory. Here is my HTML (there are many
The title is pretty self explanatory, but basically I need the table row to
The title is fairly self-explanatory, but I'll reiterate: What would be a good variable
I think the title is self-explanatory. Many times I have small typos and I
i think the title is pretty self explanatory. I have many divs generated from
The title is pretty much self-explanatory, I'm killing myself over this simplicity. Looked here

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.