This posts show how to create a float menu using jquery entire a webpage. Sometimes this float menu necessary for using long webpages. So that they can navigate easily. Sometimes it also used for special cases like contact us page, feedback page, menu , bookmark toolbar etc. Creating float menu using jquery is very simple. This tutorial only shows the floating menu using
Our final output screenshot
float menu using jquery
It is easily done using jquery and decorate using css. It is a simple task to using 2 single lines of jquery.Now see the code. It only shows the floating menu animate and scroll with the page.If you need to learn with fixed the float menu when scolling the page, you can see click here
<html> <head> <title>Float menu using jquery</title> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script> <script type="text/javascript" language="javascript"> $(document).ready(function(){ menuYloc =150; $(window).scroll(function () { var offset = menuYloc+$(document).scrollTop()+"px"; $(".demo").animate({top:offset},{duration:500,queue:false}); }); }); </script> </head> <body> <div id="header"> <h1>Simple float menu</h1> </div> <div class="demo"> <a href="">Home</a> <a href="">Contact us</a> <a href="">About us</a> <a href="">Products</a> <a href="">Services</a> </div> <div class="text"> <h4>Float menu</h4> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> <h4>Float menu</h4> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> <h4>Float menu</h4> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> <h4>Float menu</h4> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> This posts show how to create a float menu using jquery entire a webpage.<br/> </div> </body> </html>
style.css
body{ width:700px; margin:0 auto; position:relative; background:#193D36; } #header{ width:100%; height:150px; } #header h1{ color:white; } .demo{ width:130px; position:absolute; left:-130px; } .demo a{ text-decoration:none; padding:10px; background:#541D1D; display:block; color:white; font-size:16px; font-weight:bold; border-bottom:1px solid dimgray; } .text{ width:700px; padding:20px; background:#f6f6f6; color:gray; }
No comments:
Post a Comment