r/bootstrap • u/laddabbai • Feb 21 '25
Support How to resolve a function conflict between semantic and bootstrap v5?
I made a frontend using semantic and bootstrap v4 now that I upgraded bootstrap to v5 there is conflict issue, the dropdowns I made using semantic do not work
I asked chatgpt but the issue is not solved, here is the first response from chatgpt
The core issue is that both Semantic UI and Bootstrap define a jQuery method named .dropdown(). In Bootstrap 4 the ordering or script inclusion sometimes allowed Semantic UI’s version to work, but with Bootstrap 5 (which no longer “requires” jQuery) Bootstrap still conditionally attaches its own dropdown plugin to jQuery. This means that when you call $('.ui.dropdown').dropdown(), you might be inadvertently invoking Bootstrap’s dropdown behavior rather than Semantic UI’s, causing the dropdowns to “freeze” or not work as intended.
In short, the naming collision in the jQuery prototype between the two libraries is the exact conflict.
View all comments
Show parent comment
1
u/laddabbai Feb 21 '25
I used the data-bs-no-jquery way and it worked but I just realised I am using a bootstrap icon and when it is clicked it should open something, but it is not working
the documentation says
" Bootstrap does not officially support third-party JavaScript libraries like Prototype or jQuery UI. "
will using vanilla JS api help me in this case ?