How to check if Twitter bootstrap is loaded?

前端 未结 9 903
礼貌的吻别
礼貌的吻别 2020-12-07 14:32

How can I check whether there is a bootstrap.js loaded on page (a file bootstrap.js may be compiled into another big JS file)?

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 14:37

    AFAIK, Short answer is

    It is not possible to detect whether twitter bootstrap is loaded

    Details

    Twitter bootstrap is essentially css and set of js plugins to jquery. The plugin names are generic like $.fn.button and set of plugins to use are also customizable. Presence of plugin just by name would not help ascertaining that bootstrap is present.

提交回复
热议问题