Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a floating menu

Tags:

html

jquery

css

Need some advice on creating a floating menu that behaves very similar to what is used on the apple website shopping cart. I've seen some scripts that do something like this (and we've tried one) but they tend to "lag" behind the movement while apple's version gives the appearance of being stationary. A jQuery solution would be preferable.

like image 986
Akeem Avatar asked Feb 01 '26 17:02

Akeem


1 Answers

Well, looks like they are switching from relative positioning to fixed. Works better than what most people do, which is simply scroll it down more as the window is scrolled down more.

You can detect how scrolled down the window is by following what is done in the following link.

like image 191
cgp Avatar answered Feb 04 '26 07:02

cgp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!