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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:34:51+00:00 2026-06-09T22:34:51+00:00

I have the following code: area = document.createElement(‘div’); drag = document.createElement(‘div’); body.appendChild(area); area.appendChild(drag); area.onmouseover

  • 0

I have the following code:

area = document.createElement('div');
drag = document.createElement('div');
body.appendChild(area);
area.appendChild(drag);

area.onmouseover = function () {
    console.log('entered');
}
area.onmouseout = function () {
    console.log('leaved');
}

The problem is that when mouse goes over the child drag it counts as enter and leave!

Preview:
http://s12.postimage.org/xopqous19/preview.gif

  • 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-09T22:34:53+00:00Added an answer on June 9, 2026 at 10:34 pm

    Use onmouseenter and onmouseleave instead, which don’t suffer from the bubble effect.

    jQuery has a cross-browser version of both, called mousenter() and mouseleave(). Else, you can refer to this for another cross-browser implementation, which doesn’t rely on external libraries.

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

Sidebar

Related Questions

I have the following code: $(document).ready(function({ $(.click).click(function(){ alert(' The Button Was Clicked !'); });
I have the following JS code: $(document).ready(function(){ for(var i=1; i <= 6; ++i){ $('.etalage'+(i===1
I have written the following code: $(document).ready(function () { $(#rade_img_map_1335199662212).hover(function () { $(li#rs1).addClass(active); //Add
I have progress.js file which has the following code $('#text_area_input').keyup(function() { var text_area_box =$(this).val();//Get
I have following code <div id=main> <div id=one> </div> <div id=two> </div> <div id=three>
In my XUL I have the following code fragments: <map name=KeypadMap> <area href=javascript:pad('A') coords=1,1,31,31
in my site.master file, i have the following code: <map name=indexMap> <area shape=rect coords=3,9,59,24
I have the following code: $(#rade_img_map_1335199662212).hover(function () { $(li#rs1).toggleClass(active); //Toggle the active class to
i have the following code that opens a dialogue with a View. $('.bulkEditlink').click(function ()
I have following code in initialization im = imread('Image02.tif'); figure(); imagesc(im); colormap(gray); [hImage hfig

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.