A Pop-up box
A popup box that clicks on an element pops up a container containing the title and content.
Basic usage
<class= "btn btn-lg btn-danger" type= "button" Data-toggle= "PopOver" title= "pop-up box" data-content= " This is a popup box plugin "> Click the popup/Hide popup box </button>
<script type= "Text/javascript" >$ (' button '). PopOver (); </script>
As follows:
The popup plugin has a number of properties to configure the display of hints, as follows:
$ (' button '). PopOver ({container: ' body ', viewport: {selector: ' #view ', Padding:10,}});
There are four ways to do this through JavaScript.
Show
$ (' button '). PopOver (' show ');
<DivID= "View"><ButtonID= "B"class= "btn btn-lg btn-danger"type= "button"Data-toggle= "PopOver"title= "Popup box"data-content= "This is a popup box plugin"Data-trigger= "PopOver">Click the popup/Hide pop-up box</Button></Div><ButtonID= "BTN">Button</Button>
<script type= "Text/javascript" >$ (' #b '). PopOver ({ viewport:{ selector:' #view ' , padding:ten, } }); $ (' #btn '). On (' click ',function() { $(' #b '). PopOver (' show '); }); </script>
As follows:
Click the button to eject the right content
Hide
Invert Show and hide
Hide and Destroy
$ (' button '). PopOver (' destroy ');
There are two types of events in the Popover plugin.
Events, other similarities
function () {alert (' triggers when the Show method is called! ‘); });
Two Warning Box
The warning box is the message box for the hour of the click.
Basic example
<Divclass= "Alert Alert-warning"> <Buttonclass= "Close"type= "button"Data-dismiss= "Alert"> <span>×</span> </Button> <P>Warning: Your browser is not supported!</P></Div>
Add a fade effect
<class= "Alert alert-warning fade in">
If you use JavaScript, you can replace data-dismiss= "alert"
JavaScript methods
function () {$ (' #alert '). Alert (' Close ');})
There are four types of events in the Alert plugin.
Events, other similarities
function () {alert (' Called when the Close method is triggered! ‘); });
Bootstrap Popup box and warning box plugin