dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Bootstrap dropdown open on load

  1. #1
    Join Date
    Jan 2014
    Location
    Brooklyn. New York
    Posts
    10

    Bootstrap dropdown open on load

    Hello,
    Im trying to get a Bootstrap dropdown menus respective section to stay open after a menu item has been selected and the page reloads. Ive input the following js, but it is not working:

    // listen for browser/jquery ready
    $(function()
    {
    $(".dropdown.active").toggleClass("open",true);
    });

    The open class in Bootstrap causes the menu items to display block thus forcing them open. If I hardcode this in- they all stay open, so Im certain that part of the equation works...

    Any help is greatly appreciated.

    Thanks, Ryan
    Share on Google+

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    4,973
    Bootstrap is a JavaScript Framework and those questions should be asked in the JavaScript Frameworks forum
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...
    Share on Google+

  3. #3
    Join Date
    Jan 2014
    Location
    Brooklyn. New York
    Posts
    10
    Thanks \\.\ ,
    Ill move it over there

    Ryan
    Share on Google+

  4. #4
    Join Date
    Oct 2013
    Location
    Sheboygan, Wisconsin
    Posts
    1,487
    Share on Google+

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles