Results 1 to 4 of 4

Thread: Trying to create Bootstrap dropdown

  1. #1
    Junior Member
    Join Date
    Mar 2016
    Posts
    6

    Trying to create Bootstrap dropdown

    Hi I have the following code: (bootstrap included and a dropdown
    HTML Code:
    <html>
        <head>
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
          <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
           <script type="text/javascript" src="http://localhost:8000/js/status.min.js"></script>
    </head>
    
    <div class="mutual_interests_search">
      <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Dropdown Example
      <span class="caret"></span></button>
      <ul class="dropdown-menu">
        <li><a href="#">1st option</a></li>
        <li><a href="#">2nd option</a></li>
        <li><a href="#">3rd option</a></li>
      </ul>
    </div>
    The problem is that the dropdown isn't functioning at all, and I can't view the options. What's wrong here?

  2. #2
    Member
    Join Date
    Nov 2015
    Location
    Cincinnati
    Posts
    68
    Looks like you need the dropdown plug-in (see http://getbootstrap.com/components/ ) and bootstrap css

  3. #3
    Junior Member
    Join Date
    Mar 2016
    Posts
    6
    Okay I have added the bootstrap's css file to the <head> section (it was out of it).

    Next I have changed the div class to this:

    Code:
    <div class="mutual_interests_search dropdown ">  <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Looking for people that:
    And now it's working.

  4. #4
    Junior Member
    Join Date
    Mar 2016
    Posts
    6
    Okay I have added the bootstrap's css file to the <head> section (it was out of it).

    Next I have changed the div class to this:

    Code:
    <div class="mutual_interests_search dropdown ">  <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Looking for people that:
    And now it's working.

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
  •