I've been inspired by the "Proceed to checkout" button on amazon.com and I want to recreate it. However, I'm facing a challenge as their website is not responsive and I can't find a way to view a device user agent in Chrome. To see what I'm aiming for, you'll need to check it out on your smartphone, but here's the concept.
My goal is to create a scrolling sticky button. Initially, when a user lands on the page, they will see a "buy now" button at the bottom of the screen. As they scroll up and the button reaches the top of the page, I want it to stick there while they continue to scroll down. This is specifically for mobile view (responsive design).
You can see my progress so far in this JSFIDDLE.
I believe that using jQuery's .scrollTop()
method will be key in achieving the desired effect.