با استفاده از این جی کوئری می توانید یک منو با خاصیت position fixed ایجاد کنید .
آموزش استفاده
- قبل از تگ <head/>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8"/> <script type="text/javascript" src="jquery-1.3.2.js"></script> <style> body{ font-family:Arial; height:2000px; background-color:transparent; } .header { width:600px; height:56px; position:absolute; top:0px; left:25%; background:#fff url(title.png) no-repeat top left; } a.back{ width:256px; height:73px; position:fixed; bottom:15px; right:15px; background:#fff url(codrops_back.png) no-repeat top left; } .scroll{ width:133px; height:61px; position:fixed; bottom:15px; left:150px; background:#fff url(scroll.png) no-repeat top left; } .info{ text-align:right; } </style>
- بعد از تگ <body>
<ul id="navigation"> <li><div id='test' style="direction:rtl; text-align:right; padding-right:10px"> <h5>title</h5> <p>test</p> </div></li> </ul> <script type="text/javascript"> $(function() { $('div#test').stop().animate({'marginLeft':'-200px'},1000); $('li').hover( function () { $('#test',$(this)).stop().animate({'marginLeft':'-2px'},500); }, function () { $('#test',$(this)).stop().animate({'marginLeft':'-200px'},500); } ); }); </script>
سلام میخوام کاری کنم با کلیک باز شه..ممنون
سلام سینا جان فایل index.html رو باز کن و در قسمت جی کوئری به جای hover بنویس toggle