Submit your widget

jQuery Sticky scrolling Sidebar

Created 12 years ago   Views 25168   downloads 2878    Author designwoop
jQuery Sticky scrolling Sidebar
View DemoDownload
50
Share |

this is a jQuery sticky sidebar script.

Well, you can, but then the element with that style will stay where it is relative to the top of the viewport.

This means, if the element you are “fixing” in place is in the center of the page, it will stay in the center of the page as you scroll down. With this script, it will stay wherever you want it to be.

Setting the HTML

Now, we’re going to start off with some simple HTML for the sticky sidebar. In this case, we’ll be “sticking” a div with an id of “sticky”.

    <div id="sticky">
        <div id="carbonads-container">
			<div class="carbonad">
				<div id="azcarbon"></div>
					<img src="jsticky/pic.jpg"/>
				</div>
			</div>

		</div>

Setting the CSS

Now that we’ve got the foundation, we can apply some styles to it to make the page look nice.

read more: http://designwoop.com/2011/09/tutorial-creating-a-sticky-sidebar-using-jquery/

Tag: scroller