NavDock jQuery Plugin 1.2
Demo 01
Without ActiveMenu, tips desactived and ajax set to false.
Demo 02
With ActiveMenu, tips and simple Ajax Request (see main.js)
Ajax Content
Click on an icon to display his content (Demo NavDock)
Download
- NavDock jQuery Plugin v1.2 FullFull package contains the plugin files and samples.
- NavDock jQuery Plugin v1.2This package contains the plugin files only.
licence : http://creativecommons.org/licenses/by-sa/2.0/be/
How to ?
HTML
1) Menu structure
Show Plain Text2) Link Plugin Files
Show Plain Text3) Activation
Show Plain Text- <!-- Activate navDock -->
- <script type="text/javascript">
- $(document).ready(function(){
- $('#targetMenu').navDocks({
- fromSize:64, // Icon Size "normal" : Interger
- toSize:128, // Icon Size "over" : Integer
- speed:300, // Speed : Integer or 'slow' / 'fast'
- tips:true, // Tips : TRUE / FALSE
- activeMenu:false, // ActiveMenu : TRUE / FALSE
- ajax:true // Using Ajax : TRUE / FALSE
- });
- });
- </script>
CSS
Show Plain Text- /*START*/
- /*Style for menuContainer*/
- #targetMenu{
- width:448px;
- height:128px; /*max height depend of max size icon (mouseOver) and size of navActive Background.
- Here no activeNav => ex: 128px+0px = 128px */
- margin:0 auto;
- background-image:url(../img/bgMenu.png);
- background-repeat:repeat-x;
- background-position:0 bottom;
- }
- /*Style Hack IE7*/
- #targetMenu li{
- *float:left; /*IE 7 Hack with Float + Margin-Top */
- }
- /*Style for link Active icon*/
- #targetMenu li.navActive a{
- background-image:url(../img/navActive.png);
- background-repeat:no-repeat;
- background-position:center bottom;
- }
- /*Style for link icon*/
- #targetMenu li a{
- position:relative;
- display:block;
- float:left;
- width:64px; /* size of the icon when mouse is out */
- height:64px; /* size of the icon when mouse is out */
- margin-top:64px; /*result of (iconSize_Over - iconSize_Out) => ex : 128px - 64px = 64px*/
- text-decoration:none;
- }
- /*Style for icon*/
- #targetMenu li a img{ width:100%;}
- /*Style for tips*/
- #targetMenu li span.tips{
- position: absolute;
- display:block;
- top:10px; left:70px;
- padding:5px;
- background-color:#F0F0F0;
- color:#448ab0;
- text-decoration:none;
- font-weight:bold;
- }
- /*END*/
Added by Denis P. at Sat, Mar 5th 2011, 14:34
Comments (9)
hostcrz said :
awesome share dude nice . i realy love it
www.hostcrz.com
Wed, May 9th 2012, 04:56
Denis said :
@Killer ajax call is handle by yourself. In the demo02 I use main.js to handle the ajax.
The ajax parameter determines if you handle the click with an ajax request or not.
You have to write an handler for the ajax call.
bind a function on the click event and handle your ajax request using your jsp file or whatever.
in main.js I use this :
$menu1.find('li a').bind('click', ajaxCategorie);
Tue, Mar 22nd 2011, 19:47
commune_killer said :
Hi
Really appreciate the work. Quick question you are making an ajax call and passing the inded. What if i want to pass the jsp file name and not the index
Sun, Mar 20th 2011, 09:43
Cyber said :
@Denis:
Yes, I mean without the ajax. I will try the version 1.1 now. Thank you for the good work and the quick response.
Tue, Sep 14th 2010, 15:12
Denis said :
@Cyber : use the 1.1 version and take a look at the demo_01.html
It works now with regular link. But still you don't have the last animation icon.
Thanks to notice me this minor bug ;)
Tue, Sep 14th 2010, 11:35
Denis said :
and of course, you have to deal with the active class ourself. Add class="navActive" on our "active" <li> (only if you use activeMenu)
Mon, Sep 13th 2010, 22:28
Denis said :
hi Cyber,
I presume "a regular link" mean with no ajax request. Is'nt it ?
It works without ajax but you don't have the last animation (icon moves up and down)
Mon, Sep 13th 2010, 22:20
Cyber said :
This is awesome. I just have one question. Can I use the demo01 to open regular <a href> links? I tried but did not work!
Mon, Sep 13th 2010, 22:10
Trebur said :
Great thanks
Wed, Sep 8th 2010, 08:14