JJ from Bad Salzuflen, Germany
]]>Anybody know how to achieve this? Like when reaching a given height from the bottom of the page.
]]>If the technique in this tutorial is used on a fixed width, centered layout, the fixed element will not stay in its x-position when the browser window is resized. In the Apple Store it seems like Apple have found a solution that does not break when resizing the browser window.
Firefox plays nice, but Safari is not as cool about this. If ‘position: fixed’ is not added through jQuery, Safari plays nice too.
I am terrible at describing code and website behaviour, but I hope you understand what I am trying to explain.
You can see a demo of the bug here (centered, fixed width): http://jsbin.com/aqeji
]]>Many thanks Remy for creating this tuorial and all the others.
]]>parseFloat($('#comment').css('margin-top').replace(...))
is way to over complicated. NaN
values will convert to boolean false
so this will work parseFloat($('#comment').css('margin-top')) || 0;
.]]>