mouseover

Hide / show content via CSS:hover (or JS if need be)

回眸只為那壹抹淺笑 提交于 2020-01-03 20:45:55
问题 I have the following html: <li> <span class="one">Stuff here</span> <span class="two">More stuff</span> </li> .one { display: block; } .two { display: none; } What is the easiest method, preferably CSS only, to hide one and show two when the mouse rolls over the <li> container. If this cannot be done via CSS and only Javascript, I would prefer jQuery via something like live() as the content is updated live and do not wish to constantly rebind manually. EDIT: I forgot to mention that this has

jquery autocomplete - mouse below text box a causes selection after menu is shown

本秂侑毒 提交于 2020-01-02 06:46:05
问题 I have a jquery autocomplete text box at the top of a page. Typically, a user will click in the text box to give it focus, move the mouse away, and then start typing. If the user moves the mouse below the autocomplete, their mouse location can inadvertently select a suggestion, even though they didn't do anything. When this happens and the user hits the enter key, the autocomplete uses their inadvertent selection. This is a major problem due to the location of my autocomplete... it happens

Get absolute mouse position from inside iframe

Deadly 提交于 2020-01-02 04:27:12
问题 I have a webpage with an iframe rendering another page (same domain). I need to get the mouse position in relation to the parent document. Keep in mind the iframe can scroll both ways. I've tried using offset with no luck. $('#iframe').contents().find('html').on('mousemove', function (e) { //gives me location in terms of the iframe but not the entire page. var y = e.pageY; //gives me 0 var y = $(this).offset().top; //more code here.... }) 回答1: One way to do it would be to get the position of

jQuery Time mouse is over element (Hover)

帅比萌擦擦* 提交于 2020-01-01 06:56:15
问题 i have a hover event attached to a few links and when you go over it a box appears. Is there a way that i can make the hover event only trigger if the mouse has been over the link for more then 500 ms? So currently as soon as the mouse goes over the link the box appears but i want it to only appear if the mouse has been over the box for 500 ms or longer. 回答1: var myTimeout; $('#mylink').mouseenter(function() { myTimeout = setTimeout(function() { //do stuff }, 500); }).mouseleave(function() {

Accurately detect mouseover event for a div with rounded corners

回眸只為那壹抹淺笑 提交于 2019-12-31 22:35:27
问题 I am trying to detect a mouseover event on a circle. I define the circle div like this: .circle { width: 80px; height: 80px; -moz-border-radius: 40px; -webkit-border-radius: 40px; background-color: #33f; } Then I detect the mousover using jQuery like this: $('.circle').mouseover(function() { $(this).css({backgroundColor:'#f33'}); }); This works well, except that the entire 80px by 80px area triggers the mouseover event. In other words, just touching the bottom right corner of the div triggers

Accurately detect mouseover event for a div with rounded corners

狂风中的少年 提交于 2019-12-31 22:35:09
问题 I am trying to detect a mouseover event on a circle. I define the circle div like this: .circle { width: 80px; height: 80px; -moz-border-radius: 40px; -webkit-border-radius: 40px; background-color: #33f; } Then I detect the mousover using jQuery like this: $('.circle').mouseover(function() { $(this).css({backgroundColor:'#f33'}); }); This works well, except that the entire 80px by 80px area triggers the mouseover event. In other words, just touching the bottom right corner of the div triggers

Show d3 node text only on hover

我的梦境 提交于 2019-12-31 19:51:13
问题 I'm trying to only show the node text on mouseover. When I mouseover the node, I have the opacity for the svg circle changing, but only the text for the first node showing up. I've figured out that this is because of how I'm using the select element, but I can't figure out how to pull the correct text for the node that I'm hovering on. Here's what I currently have. node.append("svg:circle") .attr("r", function(d) { return radius_scale(parseInt(d.size)); }) .attr("fill", function(d) { return d

Show d3 node text only on hover

梦想与她 提交于 2019-12-31 19:50:23
问题 I'm trying to only show the node text on mouseover. When I mouseover the node, I have the opacity for the svg circle changing, but only the text for the first node showing up. I've figured out that this is because of how I'm using the select element, but I can't figure out how to pull the correct text for the node that I'm hovering on. Here's what I currently have. node.append("svg:circle") .attr("r", function(d) { return radius_scale(parseInt(d.size)); }) .attr("fill", function(d) { return d

Gnuplot 4.7 hyperlink & hypertext with SVG terminal

不问归期 提交于 2019-12-31 03:36:10
问题 I am using the SVG terminal in Gnuplot 4.7 and trying to have both hypertext and hyperlink work on the browser, activated by mouse hover and mouse click respectively on the plotted data points. The mouse hover works thanks to the help from stackoverflow on my previous question. My data input file looks like this: X Y Label Color Hyperlink 0 0 net0 2 net0.txt 1 1 net1 2 net1.txt 2 2 net2 2 net2.txt 3 4 net3_outlier 1 outlier.txt 4 4 net4 2 net4.txt My script script.gp looks like this: set

hover style can not apply when press mouse button in chrome

寵の児 提交于 2019-12-30 18:51:11
问题 All: [UPDATE] I find another way to implement this, not solution, but just a working trick: Use mousedown as a event trigger(because I need a drag action, so there should be a mousedown event anyway), inside that, bind mouseover event to that span(I do not know why, but bind mouseover inside mousedown can make mouseover work on span) , give it a new class which change the background color; The problem I had with Chrome 40 is: I set a style: span { background-color:red; } span:hover {