Share Posted August 27, 2020 Is there a way to achieve the effect of mouse hover like on the website below: https://studiomaertens.com/about if you hover on the Work or About link, there is a magentic effect on it as well as the cursor automatically scales and positions itself in center with the link, So far ive managed to combine two different examples together, the magnetic effect works but the cursor doesnt align properly with the icons Might there be a way to make a similar effect on the Studiomaertens website above. Kindly let me know Thank you See the Pen by pen (@pen) on CodePen Link to comment Share on other sites More sharing options...
Share Posted August 27, 2020 Hey Nikhil. There are several existing forum threads that cover how to do this sort of thing using different techniques: I recommend using one of those approaches instead of mixing together two that you have found. 2 Link to comment Share on other sites More sharing options...
Author Share Posted August 27, 2020 Thank you very much Zach I'm struggling a bit to combine the magnetic effect with the cursor one, as it's an urgent on the project i have to implement in. Any chance i can get an example? Link to comment Share on other sites More sharing options...
Share Posted August 28, 2020 Two of the forums posts that I linked to above do both the magnetic effect along with the size change. What, specifically, are you having trouble with getting either approach working in your project? Link to comment Share on other sites More sharing options...
Author Share Posted August 28, 2020 Hey Zach, Actually figured it form one of the projects, but thank you very much for the help Cheers Link to comment Share on other sites More sharing options...
Author Share Posted September 6, 2020 Hello, might anyone know why the cursor is is tweening only on the last element and not on the first two, i have added a for each loop on the targeted elements but yet only works on the last one. I think it might be the if condition although it is giving true outcomes. See the Pen bGpWmXd by nikhil-ladhani-nl (@nikhil-ladhani-nl) on CodePen Link to comment Share on other sites More sharing options...
Share Posted September 7, 2020 You're loop is running the same logic over and over. It will always be the condition of the last loop. You probably need to use a for loop with something like break or continue. See how I do it here. See the Pen ae04f1f23935e7d7a13c823d6141dec2 by osublake (@osublake) on CodePen 6 Link to comment Share on other sites More sharing options...
Share Posted August 18, 2022 On 9/7/2020 at 2:27 AM, Nikhil009 said: Hello, might anyone know why the cursor is is tweening only on the last element and not on the first two, i have added a for each loop on the targeted elements but yet only works on the last one. I think it might be the if condition although it is giving true outcomes. Can anyone help with this? I'm having the same problem. Link to comment Share on other sites More sharing options...
Share Posted August 18, 2022 @mrtsrds could you start a new topic and post a minimal demo with it. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now