GitHub repo (GitHub - CodeTorso/codetorso.github.io: My portfolio.)
I am having this social bubble something like in my website.
I want the social bubbles to move randomly in the parent container. But they are constantly ending up overlapping each other.
- I think they should go up or down but not overlap each other.
- Also, when hovered what if the other closer div gets pushed.
- Or maybe I can drag it with my cursor.
I want something like (cryptobubbles net; I cannot include more than 2 links sorry) but I was unable to reverse engineer the code.
I tried to stick with JS, HTML and CSS. But jQuery is also there.
I read this but still there were just too many things. :\
Welcome to the forums @CodeTorso
What you are trying to do is a very nice (yet complicated) effect! What you will need is some level of collision detection to have each circle bounce away from each other.
How many items do you foresee yourself having? Is it the 7 you have in your website right now?
Sorry, I haven’t had time to look into this. What you need to do is have a variation of this: Animating Many Things on a Canvas | kirupa.com
The part you’ll need to add is some basic collision detection to have items bounce back when they hit another item.
Would notify you about the progress