Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. document.addEventListener("mousemove", e => {
  2. cursorLink.forEach(item => {
  3. item.addEventListener("mouseenter", function(i) {
  4. });
  5. item.addEventListener("mouseleave", function() {
  6. });
  7. });
  8. }
  9. });
  10.  
  11. item.addEventListener("mouseenter", function(i) {
  12. const block = i.currentTarget;
  13. const cursorTarget = block.querySelector('.ct');
  14. const targetBounds = cursorTarget.getBoundingClientRect();
  15. targetX = targetBounds.left - 28;
  16. targetY = targetBounds.top - 28;
  17. isStuck = true;
  18. });
  19.  
  20. if (!isStuck) {
  21.  
  22. if (isStuck) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement