jasonxsmithx
New Member
Well, I have this navigation menu which is static but I want to make it flow smoothly whenever user scrolls his page down or up... Please help with the code because I already have tried to do something but everything went bad.Code: \[code\]<div id="menu"> <ul> <li class="page_item"> <a href="http://stackoverflow.com/questions/14573551/<?php bloginfo('url'); ?>" title="Go home">Home</a> </li> <?php wp_list_pages('&title_li=&exclude=6386'); ?> <?php if(is_user_logged_in() && !current_user_can('subscriber')) : ?> <li class="page_item"> <a href="http://stackoverflow.com/questions/14573551/<?php bloginfo('url'); ?>/tasks/" title="Your task list">Tasks</a> </li> <?php endif; ?> <?php if(!is_user_logged_in()) : ?> <li class="page_item"> <a href="http://stackoverflow.com/questions/14573551/<?php bloginfo('url'); ?>/wp-admin/">Log in</a> </li> <?php endif; ?> </ul> </div>\[/code\]I want this whole thing to float, how am I supposed to do this? I tried to add this script and give menu class="scroller": \[code\]$(window).load(function(){$(window).scroll(function(){ if($(window).scrollTop()>60){ $('.scroller').css('position', 'fixed'); $('.scroller').css('top', 0); } else { $('.scroller').css('position', 'relative'); $('.scroller').css('top', 60); }});\[/code\]});But no luck..