Questions tagged [mouseenter]

For issues relating to setting up, subscribing to, or handling mouseenter events.

Mouseenter is an event that fires when the user moves the mouse inside of the element you registered the event on.

576 questions
31
votes
6 answers

JS: Touch equivalent for mouseenter

is there a touch equivalent of the mouseenter. I would like to detect if user slide on my DIV. I prefer a solution depending directly on the target element not on a parent element with recounting positions etc. The site:…
Tomas Randus
  • 2,127
  • 4
  • 29
  • 38
16
votes
5 answers

Mouseover and mouseleave trigger every time I move the mouse inside the given element

I am creating a site where you hover the mouse over an image and it shows an element (in this case by expanding its height from 0 to 154px). jQuery(document).ready(function(){ jQuery("#dropdown-menu-create .dropimage").mouseover(function(){ …
bcloutier
  • 411
  • 2
  • 4
  • 11
15
votes
2 answers

In React, onMouseEnter or hover is not working as expected

I have one image with opacity = 1 at the beginning. When mouse enters the image, change opacity = 0.5. When mouse leaves the image, change the opacity back. here is one code: mouseEnter() { console.log('mouse enter') const classname = '.' +…
Benjamin Li
  • 1,687
  • 7
  • 19
  • 30
13
votes
2 answers

mouseenter delegation using vanilla JavaScript?

How do I implement event delegation for the mouseenter event? I'm looking for the equivalent to this jQuery code, but didn't manage to understand how jQuery does it internally: $(document).on('mouseenter', '.demo', foo); I've seen this other…
Alvaro
  • 40,778
  • 30
  • 164
  • 336
10
votes
4 answers

JQuery animate border without moving div

I want to animate a div by first making it's border thicker by 5px on mouseenter, then decreasing the border by 5px on mouseleave, the tricky part is that I don't want the div to look like it's moving (if you just animate the borders, the whole div…
vinceh
  • 3,490
  • 1
  • 21
  • 24
8
votes
3 answers

mouseleave not firing after mouseenter changes HTML within anchor

I'm sure I'm overlooking something but I can't seem to get the "mouseleave" event to fire after I replace the html within the anchor tag that triggered the mouseenter. Adding code here but really it's much simpler if you visit the JSFiddle link…
Adergaard
  • 760
  • 10
  • 24
8
votes
2 answers

mouseenter/mouseleave ignoring covering element

It seems that the mouseenter/ mouseleave method is trigger not only when the mouse's coordinate enters the target's client rectangles, but also when another element uncover or cover the target. This is a problem because in my mouseenter callback, I…
user690421
  • 422
  • 1
  • 5
  • 15
8
votes
1 answer

JQuery hover loop

I have a problem with this JQuery code: $(".item").mouseenter(function(){ $(this).addClass("active"); $(this).removeClass("item"); $(".item").hide(700); }).mouseleave(function(){ $(this).stop(); $(this).addClass("item"); …
Mohsen Safari
  • 6,669
  • 5
  • 42
  • 58
7
votes
4 answers

Jquery: How to add a delay to mouseleave so if someone accidentally hovers off the element unintentionally, it still stays open

THE hoverintent plugin is the opposite of what I need. I have a .popup that is triggered by .trigger, when i hover off of it, i want .popup to NOT fadeout for a few seconds, but if I hover off, then hover on again, cancel the fadeout that was going…
android.nick
  • 11,069
  • 23
  • 77
  • 112
7
votes
1 answer

Why do the mouseenter/mouseleave events fire when entering/leaving child elements in an SVG?

I have an SVG, inside which there are more SVGs with a variable number of rect elements inside them, all generated from a data object. Here's the general hierarchy:
3cheesewheel
  • 9,133
  • 9
  • 39
  • 59
6
votes
3 answers

change cursor over a pictureBox

i was trying to implemet an image button in winforms application as i can ...easy when using asp.net the problem seem to be(i suspect) that when the mouse is over the image inside the picturebox it is not responding or not triggering the…
LoneXcoder
  • 2,121
  • 6
  • 38
  • 76
6
votes
1 answer

AngularJS: Preventing 'mouseenter' event triggering on child elements

I'm playing right now with the AngularJS framework and I stumbled upon a problem. I made a directive which is called 'enter'. It triggers functions on mouseenter and mouseleave. I applied it as an attribute to the table row elements. It is now…
justGoscha
  • 24,085
  • 15
  • 50
  • 61
5
votes
3 answers

check for ('div')mouseenter on ('a')mouseleave

my problem is following: I got a trigger(a) and a popup(div). The div doesn't lie nested inside the anchor. When I hover over a, I want the div to show up. When I go from a to the div, I want it to stay visible. When I leave the div, I want it to…
chabuya
  • 143
  • 1
  • 3
  • 10
5
votes
1 answer

mouseleave event does not work in absolute child element

I have menu list like
The first ul tag is opening from some other onmouseover event of the…
nas
  • 51
  • 2
5
votes
1 answer

click event affects mouseenter and mouseleave on chrome, is it a bug?

after adding events both mouseenter and mouseleave,click the element(the times of click is uncertain),the mouseenter and mouseleave will be triggered. I try chrome 62.0.3202.94(32),firework,IE,and it only happened on chrome.Is it a bug of chrome,or…
J.J
  • 51
  • 5
1
2 3
38 39