Before introducing Bootstrap. JS, we need to introduce jquery JS files.
Both the bootstrapplug-in and the bootstrap.css core files are used.
This section describes how to use tooltip information plug-ins.
<A href = 'javascript:; 'rel = 'tooltip 'Title = 'information I am prompted' class = 'btn BTN-Primary '> click here to display the prompt message </a>
Call method:
<SCRIPT>
$ (Function (){
$ ("A [rel = 'tooltip ']"). tooltip ();
})
</SCRIPT>
In this way, the tooltip information is automatically displayed above the corresponding element.
So what if I want to display this prompt in other places?
Simple:
The property of the control orientation isData-replacement= '? '? YesTop, bottom, left, right
<A href = 'javascript:; 'rel = 'tooltip 'data-original-Title = 'tooltip on bottom'Data-placement = 'bottom'Class = 'btn BTN-Primary '> click to display the prompt message </a>
By the way, the data-original-title attribute has the same effect as the title attribute. If the two attributes are defined at the same time, only the prompt content of the title attribute is displayed.