4

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.

1 Answer 1

1

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>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.