[ad_1]
i am doing a function in javascript that cubes fallow the mouse movement but i need to make them get back to original position when i hover over some div and stop move as long as the mouse inside that div that if i move the mouse inside that button the cube dosen't move but back to moving the moment i get out of the button
<script>
function cubes()
$(document).on("mousemove",function(e)
$(".cube1").attr("style", "transform: translateX("+ax+"px)
translateY("+ay+"px)");
);
;
$(".button").hover(function()
$(".cube1").css("transforme":"translate(0)")
);
</script>
<style>
.button
width:200px;
height:200px;
[ad_2]
لینک منبع