Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript How to make a floating module, like apple/store/cart

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26612
    schedal
    Member

    Hi, how can I make a menu/block of CSS float on the page like this:
    http://store.apple.com/us/cart

    Make your browser very thin, and scroll down, the cart moves with your page. However this is NOT using just position:fixed since the cart "knows" when you are at the top and only starts to scroll after a certain distance is moved, and I see javascript being called. However their code is very mixed like spaghetti; so hard to unravel.

    Any ideas? Is this a simple function in an existing JS package?

    Thanks!

    #66070
    blue642
    Member

    This article/screencast is what i believe you’re looking for.

    #66071
    schedal
    Member

    sorry there blue, but I dont see any links in your post… thanks! ;)

    #66081
    blue642
    Member

    http://jqueryfordesigners.com/fixed-floating-elements/

    oops, I must’ve set it to display:none…. just kidding.

    #66101
    schedal
    Member

    Excellent! thanks!!

    #97283
    wikijames
    Member

    there is a problem in that cart ..
    http://jqueryfordesigners.com/fixed-floating-elements/
    when you resize the browser , that cart can’t maintain its it standard position ..
    see apple cart . it maintain position and you can see it also after resize of browser .

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.