thomaspark / bootswatch

Themes for Bootstrap
https://bootswatch.com
MIT License
14.54k stars 3.67k forks source link

Dropdown not working @4.6.0/dist/united #1117

Closed dianekaplan closed 3 years ago

dianekaplan commented 3 years ago

I'm using bootstrap CDN and I'm so excited to have found this theme!

Unfortunately when I copy/paste the sample code for the gray navbar here, nothing happens when I click the down arrow for the dropdown field. `

`

Here are my css and js files:

        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@4.6.0/dist/united/bootstrap.css">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@4.6.0/dist/united/bootstrap.min.css">

        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>

Is there a different javascript file (or something else) I need to make the toggle work correctly in the example code? I tried substituting the files listed in this similar ticket, but no luck.

Thanks in advance! Diane

dianekaplan commented 3 years ago

got it! The sample navbar code does work if I swap in the 5.0.2 version of the bootstrap js: https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js

thomaspark commented 3 years ago

Hey Diane, glad you got it working. If you run into any other issues with the theme, please let us know!

ayushnoori commented 2 years ago

Ran into the same issue today, it appears that Bootswatch is incompatible with the template code available on the Bootstrap website? Thanks @dianekaplan for the fix!

ekrichbaum commented 2 years ago

a little related and a little not. That was bootstrap 4.0 not 4.6. You may want to try just matching up to see if your issue goes away, or use Bootstrap 5 with the matching Bootswatch 5. Note that there are some differences in style names to deal with but matching up will always be a good place to start.

ayushnoori commented 2 years ago

Sounds great, will investigate. Thanks, @ekrichbaum.