Reputation: 1
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
<a href="LINK" data-toggle="tooltip" title="text_">over me</a>
How do you display the link of the attribute(href), in tooltip bootstrap?
Upvotes: 0
Views: 8227
Reputation: 347
If you read the Bootstrap Documentation (http://getbootstrap.com/javascript/#tooltips) than you could expand the code you just using, but i guess you havent. But here is the code you looking for:
$(document).ready(function() {
$('[data-toggle="tooltip"]').tooltip({
selector: true,
title: function() {
return $(this).attr('href');
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<a href="LINK" data-toggle="tooltip" data-placement="bottom" title="Some Text!">Hover over me</a>
Upvotes: 1