Can you have multiple bootstrap versions on the same page?

人盡茶涼 提交于 2021-02-11 12:14:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!