Before reading, you can also go to the Bootstrap3.0 getting started learning series navigation to view the http://www.cnblogs.com/aehyok/p/3404867.html
This article mainly describes the JavaScript plug-in-warning box.
Case
You can use this plug-in to disable all warning boxes.
<div id= => <button id= type= = data-dismiss= aria-hidden=>×</button> <strong>Holy guacamole!</strong> Best check yo self, you </div>
Another small example
<div => <button type= = data-dismiss= aria-hidden=>×</button>
You can use the data-dismiss attribute to disable the warning box function. No JavaScript code is required. You only need to set the close buttondata-dismiss="alert"
The alarm box is automatically disabled.
Usage
If you enable the warning box function in JavaScript:
Let's modify the first simple example.
<div id= => <button id= type= = onclick= aria-hidden=>×</button> <strong>Holy guacamole!</strong> Best check yo self, you </div>
We removed the data-dismiss attribute of the close button and added an onclick event, that is, the event in the close Alert box.
Let's take a look at how to close the Alert box through JavaScript.
<script type=>).alert(</script>
Disable all warning boxes. If you want to render the animation when the warning box is closed, make sure that you have added.fade
And.in
.
Event
The warning box in Bootstrap exposes a group of events that allow you to listen.
<script type=>).bind(</script>
After the above Code is added, When you click the close button, the code in the function is executed first, and then the warning box is closed.
I feel more and more familiar with myself. The time for completing this warning box is obviously shortened. It seems that I have learned it too.
This article has been updated to the Bootstrap3.0 getting started learning series navigation http://www.cnblogs.com/aehyok/p/3404867.html