dshongphuc / magic-mouse-js

A lightweight javascript library to create some amazing effects for the mouse (cursor) on your website - MagicMouse.js : https://magicmousejs.web.app/
MIT License
389 stars 60 forks source link

Disabled on mobile devices and mouse cursor style on hover #10

Closed firmincol closed 3 years ago

firmincol commented 3 years ago

Hi, Thanks for your magic mouse. It's awesome and really help me ! However, I have 2 issues I can't fix:

I really appreicate if you can give me a solution for this.

dshongphuc commented 3 years ago

Hi @firmincol , I checked the CDN code and it seem everything is good. Can you post your website here for me to check?

firmincol commented 3 years ago

No problem : www.lecolletgourmand.be

I tried again on mobile and the magic mouse is still there.

Thanks for your help

habitualshaker commented 3 years ago

It looks like Magic Mouse will appear on all devices over 768px. Would be better if possible to incorporate a check to see if a mouse is being used and only activate it then?

dshongphuc commented 3 years ago

Hi @habitualshaker & @firmincol , sorry for my delay ! I was thinking about using 3nd party library to detect mobile & tablet device long time ago, but at that time I see other libs is too much heavily just for this purpose. I really want Magicmouse.js to be super lightweight, so I didn't want to use 3nd libs. Now I excited to let you know that I've found another lightweight libs to do exactly what we want to, it's just detect if device is touchable, it's Modernizr (it support a lot of features but I only get the "touch screen event").

I've integrated it to source code and CDN, this issue has been solved in version 1.1 : https://res.cloudinary.com/veseylab/raw/upload/v1613706377/magicmouse/magic_mouse-1.1.js

Thank you ! Hope you enjoy it, let me know if any problem with this. Notice : I have not update the live demo to latest version, will do it later when have time