Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of the bootstrap plug-in

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "what is the use of the bootstrap plug-in", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "what is the use of the bootstrap plug-in" this article.

With Bootstrap data API (Bootstrap Data API), most plug-ins can be triggered without writing any code.

There are two ways for sites to reference the Bootstrap plug-in: (recommended study: Bootstrap video tutorial)

Individual references: individual * .js files that use Bootstrap. Some plug-ins and CSS components depend on other plug-ins. If you reference plug-ins separately, make sure that you understand the dependencies between these plug-ins.

Compile (simultaneously) reference: use bootstrap.js or a compressed version of bootstrap.min.js.

Do not try to reference both files at the same time, because both bootstrap.js and bootstrap.min.js contain all the plug-ins.

All plug-ins depend on jQuery. So jQuery must be referenced before the plug-in file. Please visit bower.json to view the currently supported jQuery versions of Bootstrap.

Data attribute

You can use all Bootstrap plug-ins simply through the data attribute API without having to write a single line of JavaScript code. This is the first-class API in Bootstrap, and it should be your first choice.

Then again, you may need to turn this feature off in some cases. Therefore, we also provide a way to turn off the data property API, that is, to unbind events that have the data-api namespace and bind to the document. It looks like this:

$(document) .off ('.data-api')

To close a specific plug-in, simply add the name of the plug-in as the namespace before the data-api namespace, as shown below:

$(document) .off ('.alert.data-api')

Example: modal box plug-in

Bootstrap instance-Modal Box (Modal) plug-in create Modal Box (Modal) start demonstration Modal Box × Modal Box (Modal) title add some text here close submit changes above is all the content of this article "what is the use of the bootstrap plug-in", thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report