jQuery floating div on screen

Posted: July 29, 2013 in Jquery
Tags: ,

<title>floating div on screen</title>
<meta charset="UTF-8" />

<!-- ============= floating button start ========= -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
<script src="http://dropthebit.com/demos/stickyfloat/stickyfloat.js" type="text/javascript"></script>
#floatingButton {
background: none repeat scroll 0 0 green;
color: #FFFFFF;
right: 50px;
padding: 15px;
position: absolute;
width: 210px;
jQuery('#floatingButton').stickyfloat({duration: 400,  offsetY :50, easing :'swing'});
<!-- ============= floating button end ========= -->

<div style="height:1200px; width:900px; background: #EAEAEA;"> &nbsp;
<div id="floatingButton" style='height:100px; width:100px;'>Button</div>



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s