问题
I'd like embed bootstrap on a page that has an old version of bootstrap (version 3 and version 4 of bootstrap, however, there are js conflicts.
I'm embedding it in a 3rd party site I have no control over.
Is there a bootstrap noConflicts mode like jQuery (https://api.jquery.com/jQuery.noConflict/)
回答1:
bootstrap does have noConflict - https://getbootstrap.com/docs/3.4/javascript/
less can be used to namespace the css, however, I needed to manually namespace the classes/id in bootstraps js... :(
来源:https://stackoverflow.com/questions/54113144/can-you-have-multiple-bootstrap-versions-on-the-same-page