mouseover
How to show hidden divs on mouseover?
If the divs are hidden, they will never trigger the mouseover event. You will have to listen to the event of some other unhidden element. You can consider wrapping your hidden divs into container divs that remain visible, and then act on the mouseover event of these containers. <div style=”width: 80px; height: 20px; background-color: red;” … Read more
How to draw grid using swing class Java and detect mouse position when click and drag
There are any number of ways to get this to work, depending on what it is you want to achieve. This first example simply uses the 2D Graphics API to render the cells and a MouseMotionListener to monitor which cell is highlighted. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Graphics; import java.awt.Graphics2D; import … Read more
Trigger click on select box on hover
I finally got this to work! You need Chosen; as others have pointed out, you can’t do this with a normal select because there are no events available to use. But this will pop open the menu when you mouseover the select and close it when you mouseout, which is the exact effect I wanted. … Read more
jQuery disable scroll when mouse over an absolute div
This has been a popular question so I am updating to give an overview of the answers provided here and which may be best for you. There are three unique solutions included. Two are from Amos and one is from myself. However, each operates differently. Amos – Set overflow:hidden on body. This is simple and … Read more
close InfoWindow before open another
The suggestion is only create one infowindow (in the global scope), reuse it and change its contents when a marker is clicked, close it if the user clicks on the map. code snippet (removes the dependency on the AJAX call): // global variables var map; var markers = []; var infowindow = new google.maps.InfoWindow(); function … Read more
Image Greyscale with CSS & re-color on mouse-over?
There are numerous methods of accomplishing this, which I’ll detail with a few examples below. Pure CSS (using only one colored image) img.grayscale { filter: url(“data:image/svg+xml;utf8,<svg xmlns=\’http://www.w3.org/2000/svg\’><filter id=\’grayscale\’><feColorMatrix type=\’matrix\’ values=\’0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\’/></filter></svg>#grayscale”); /* Firefox 3.5+ */ filter: gray; … Read more
iPad/iPhone hover problem causes the user to double click a link
Haven’t tested this fully but since iOS fires touch events, this could work, assuming you are in a jQuery setting. $(‘a’).on(‘click touchend’, function(e) { var el = $(this); var link = el.attr(‘href’); window.location = link; }); The idea is that Mobile WebKit fires a touchend event at the end of a tap so we listen … Read more
How to remove default mouse-over effect on WPF buttons?
This is similar to the solution referred by Mark Heath but with not as much code to just create a very basic button, without the built-in mouse over animation effect. It preserves a simple mouse over effect of showing the button border in black. The style can be inserted into the Window.Resources or UserControl.Resources section … Read more
Text on image mouseover?
This is using the :hover pseudoelement in CSS3. HTML: <div id=”wrapper”> <img src=”http://placehold.it/300×200″ class=”hover” /> <p class=”text”>text</p> </div> CSS: #wrapper .text { position:relative; bottom:30px; left:0px; visibility:hidden; } #wrapper:hover .text { visibility:visible; } Demo HERE. This instead is a way of achieving the same result by using jquery: HTML: <div id=”wrapper”> <img src=”http://placehold.it/300×200″ class=”hover” /> <p … Read more