Find file
Fetching contributors…
Cannot retrieve contributors at this time
85 lines (66 sloc) 2.91 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<title>Floating sidebar</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="js/jquery.stickyfloat.js"></script>
<link type="text/css" rel="stylesheet" media="all" href="css/style.css" />
<script type="text/javascript">
$(function() {
$('.stickyfloat').stickyfloat({ duration: 100 });
<div class="header">
<div class="stickyfloat bar">Header (constrained)</div>
jQuery - stickyfloat
<div class="content">
<div class="stickyfloat" id="menu">
Archives <br />
<em>constrainted to content</em>
<div class="text">
<h1>Smart sticky floating box</h1>
<p><strong>Scroll down, the 'archives' sidebar will follow!</strong></p>
<p> See other white boxes that will float as you scroll but are constrained in parent div</p>
<p>Want your box to float beside you as you scroll, but ONLY in a specific constrained area? or only on it's parents area? - you got it.</p>
<li>Extremely useful for side-menus</li>
<li>All in one vertical floating solution</li>
<div class="stickyfloat bar">Params header</div>
<li>duration - the duration of the animation</li>
<li>startOffset - the amount of scroll offset after it the animations kicks in</li>
<li>offsetY - the offset from the top when the object is animated</li>
<li>lockBottom - 'true' by default, set to false if you don't want your floating box to stop at parent's bottom</li>
<pre>jQuery('#menu').stickyfloat({duration: 400});</pre>
<li><a href="">Design Woop</a></li>Great Blog Entry (this demo is hacked from there)</li>
<li><a href="">Previous Gist version</a></li>
<li><a href="">Original plugin</a> - no working for me</li>
<li><a href="">Github</a></li>
<li><a href="">jQuery</a></li>
<div class="footer">