I am trying to display html content on tooltip title.
But the plain text is being displayed.
<a href="javascript:void(0);" data-html="true" data-toggle="tooltip1" title="<p><label>package_qty</label> (0 status)</p>">0</a>
And initialization:
$('[data-toggle="tooltip1"]').tooltip();
Setting data-html
value to true
seems to be not working.
I am using bootstrap version 3.3.7
.
hopefully these links can help you, have a nice day!
discussion Can I use complex HTML with Twitter Bootstrap's Tooltip?
fiddle http://jsfiddle.net/44khF/200/
$('.tooltip-demo.well').tooltip({ selector: "a[rel=tooltip]" })
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script> <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"/> <div class="tooltip-demo well"> <p style="margin-bottom: 0;" class="muted">Tight pants next level keffiyeh you probably haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel have a terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A <a title="<h1><b>Another</b> <em>one</em> here too</h1>" data-html="true" rel="tooltip" href="#">really ironic</a> artisan whatever keytar, scenester farm-to-table banksy Austin twitter handle freegan cred raw denim single-origin coffee viral. </p></div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.