如何从 JavaScript 检测使用哪个 Bootstrap 版本? [英] How to detect which Bootstrap version is used from JavaScript?

查看:27
本文介绍了如何从 JavaScript 检测使用哪个 Bootstrap 版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究 CSS &来自 Bootstrap 3 的 JavaScript.没有任何东西在通用别名下模块化.对于 JavaScript,它被注入到 jQuery 的原型中...

I've been looking at the CSS & JavaScript from Bootstrap 3. Nothing is modularized under a common alias. For the JavaScript, it is injected into jQuery's prototype...

如何使用 JavaScript 从第三方插件/库的角度检测用户网页中包含哪个版本的 Bootstrap?

How would it be possible to detect which version of Bootstrap is included in a user's web page from a third party plugin/library point of view with JavaScript?

推荐答案

Bootstrap 的每个 jQuery 插件的版本都可以通过插件构造函数的 VERSION 属性访问

The version of each of Bootstrap's jQuery plugins can be accessed via the VERSION property of the plugin's constructor

$.fn.tooltip.Constructor.VERSION

这篇关于如何从 JavaScript 检测使用哪个 Bootstrap 版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆