Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    Member #
    34524
    HI,

    I need some help on my jquery. I need to make the menu bar stay put. This is my coding below:
    Can anyone help pls.

    $(document).ready(function(){

    $('li.button a').click(function(e){

    /* Finding the drop down list that corresponds to the current section: */
    var dropDown = $(this).parent().next();

    /* Closing all other drop down sections, except the current one */
    $('.dropdown').not(dropDown).slideUp('slow');
    dropDown.slideToggle('slow');

    /* Preventing the default event (which would be to navigate the browser to the link's address) */
    e.preventDefault();
    })

    });

    Regards
    Jai

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Need to see it in action
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    Member #
    34524
    Quote Originally Posted by Ronald Roe, post: 246526
    Need to see it in action
    hi ronald, if possible can u skype me at satia03, i wud b able to show it to my problem.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    CSS code:
    Code:
    ul#whatever-your-menu-is-called {position:  fixed;}
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    Member #
    34524
    Quote Originally Posted by TheGAME1264, post: 246528
    CSS code:
    Code:
    ul#whatever-your-menu-is-called {position:  fixed;}
    Thanks for the rep, but can u help on which part it needs to be added

    ul{
    margin:0;
    padding:0;

    }

    ul.container{
    /* The topmost UL */
    width:200px;
    margin:0 auto;
    padding:10px;
    }

    li{
    list-style:none;
    text-align:left;

    }

    li.pdtmenu{
    /* The main list elements */
    padding:2px 0;
    width:100%;
    }

    .pdtmenu li.button{
    border:0;
    }

    li.button a{
    /* The section titles */
    display:block;
    font-family:BPreplay,Arial,Helvetica,sans-serif;
    font-size:12px;
    height:20px;
    overflow:hidden;
    padding:10px 20px 0;
    position:relative;
    width:160px;

    }

    li.button a:hover{
    /* Removing the inherited underline from the titles */
    text-decoration:none;
    }

    li.button a span{
    /* This span acts as the right part of the section's background */
    height:30px;
    position:absolute;
    right:0;
    top:0;
    width:4px;
    display:block;

    }

    /* Setting up different styles for each section color */

    li.button a.blue{background:url(../images/img/grey15.png) repeat-x top left; color:#074384;}
    li.button a.blue span{ background:url(../images/img/grey15.png) repeat-x top right;}

    li.button a.green{background:url(../images/img/grey15.png) repeat-x top left; color:#074384;}
    li.button a.green span{ background:url(../images/img/grey15.png) repeat-x top right;}

    li.button a.orange{background:url(../images/img/grey15.png) repeat-x top left; color:#074384;}
    li.button a.orange span{ background:url(../images/img/grey15.png) repeat-x top right;}

    li.button a.red{background:url(../images/img/grey15.png) repeat-x top left; color:#074384;}
    li.button a.red span{ background:url(../images/img/grey15.png) repeat-x top right;}

    /* The hover effects */

    li.button a:hover{ background-position:bottom left;}
    li.button a:hover span{ background-position:bottom right;}

    .dropdown{
    /* The expandable lists */
    display:none;
    padding-top:5px;
    width:100%;
    }

    .dropdown li{
    /* Each element in the expandable list */
    background-color:#FFFFFF;
    border:0px solid #40392C;
    color:#CCCCCC;
    margin:5px 0;
    padding:4px 18px;

    }

    /* The styles below are only necessary for the demo page */

    h1{
    font-family:"Myriad Pro",Arial,Helvetica,sans-serif;
    font-size:24px;
    font-weight:normal;
    margin-bottom:15px;
    }

    h2{
    font-family:"Myriad Pro",Arial,Helvetica,sans-serif;
    font-size:10px;
    font-weight:normal;
    padding-right:140px;
    right:0;
    text-align:right;
    text-transform:uppercase;
    top:15px;
    }

    .clear{
    clear:both;
    }

    #main{
    /* The main container */
    margin:15px auto;
    text-align:center;
    width:800px;
    position:relative;
    }

    a, a:visited {
    color:#0196e3;
    text-decoration:none;
    outline:none;
    }

    a:hover{
    text-decoration:underline;
    }

    p{
    /* The tut info on the bottom of the page */
    padding:5px;
    text-align:center;
    }

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Not without seeing the rest of the page.

    Post the link here so we can all see it.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

how do i make the top bar stay on
,

how to make menu bar stay

,
how to make the menu bar stay
,
how to make top bar stay
Click on a term to search for related topics.
All times are GMT -6. The time now is 04:29 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com