How to make fire hover when hovering?

Good time Sotho, there is a piece of code works as expected - I can not understand as to make so that when you hover over the elements "and" working out hover effect
.custom-cursor {
 position: fixed;
 top: -2px;
 left: -2px;
 width: 4px;
 height: 4px;
 border-radius: 50%;
 background-color: #01a99c;
 z-index: 100;
 pointer-events: none;
 transition: transform 0.4 s cubic-bezier(0.25, 1, 0.25, 1.0);
.custom-cursor .default {
 position: absolute;
 top: -18px;
 left: -18px;
 width: 40px;
 height: 40px;
 border: 1px solid #9c9c9c;
 border-radius: 50%;
 opacity: 0.2;
 box-sizing: border-box;
 z-index: 99;
.custom-cursor .hover {
 position: absolute;
 top: -38px;
 left: -38px;
 width: 80px;
 height: 80px;
 background-color: #bbb;
 border-radius: 50%;
 opacity: 0.12;
 z-index: 98;
 box-sizing: border-box;
<div class="custom-cursor">
 <div class="default"></div>
 <div class="hover" style="display:none"></div>
the <script>
$(window).mousemove(function (pos) {
 $(".custom-cursor").css({"transform": "translate3d(" + pos.originalEvent.clientX + "px," + pos.originalEvent.clientY + "px, 0px)"});
March 19th 20 at 09:00
2 answers
March 19th 20 at 09:02
Buggy you have the cursor of course. But you dig not from that side. You should put a mouse hover event to all elements that should change the cursor on hover. When you hover this element, show hover your cursor, while mouse remove the cursor hover.
Example (I used there jQuery hover event).
Thank you very much ) - George_Reilly commented on March 19th 20 at 09:05
March 19th 20 at 09:04


Find more questions by tags jQueryJavaScriptCSS