I have included two bootstrap links in my HTML page. This is causing issues with the accoridan I have included. The accordian once opened wont collapse when clicked again.
I have figured out that this is because of the two bootstrap links and the problem is solved when I remove one. Does anyone know why this is occurring and how to solve this?
The two bootstrap links are a local copy and a CDN copy. I use the CDN primarily and have a local backup incase the CDN is down.
Any help is appreciated.
Unfortunately, Bootstrap doesn't provide a specific variable for the fallback purpose. However, you can still achieve the CDN fallback behavior, you can test for one of the bootstrap plugins. For example, you can check for the
modalplugin like below-This will only load the local version of the
bootstrap.min.jsfile if the CDN doesn't work.Please note that this might fail in future if the
modalplugin gets renamed or removed in future.