Answer the question
In order to leave comments, you need to log in
How to set hover effect when hovering over image with timeout?
Hello,
You need to set the Hover effect, which will not work immediately when hovering over the picture, but only if the mouse cursor lingers on the picture for 1 second. If the cursor only "touched" the image, then nothing is done. How can this be implemented?
Tried:
setTimeout(function() {
...
}, 500)
<div class="thumb">
<a href="#">
<img src="preview-1.jpg"/>
</a>
</div>
<div class="thumb">
<a href="#">
<img src="preview-2.jpg"/>
</a>
</div>
Answer the question
In order to leave comments, you need to log in
You started right, but didn't finish a bit :)
jsfiddle.net/DelphinPRO/b1ybz2jn
div .thumb {
transition: 0s background-color;
}
div .thumb:hover{
background-color:red;
transition-delay:1s;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question