I am trying to get the formatting right for the tooltips but i cant figure out how to.
The code below works perfectly:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Bootstrap 4 Tooltip</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
</head>
<body>
<a class="btn btn-primary btn-lg" href="#" data-toggle="tooltip" title="Default tooltip">Button!</a>
</body>
</html>
In my blazor server app, I have included the exact same code in the _host.cshtml, but the tooltips doesnt get the right formatting. I am pretty sure that this has to do with the rendering logic, since if I take a tooltip element from one of my routable pages, and places that directly in the _host.cshtml, it works. The question is, how can I get this right in my routable pages.?
Tooltip 'Test1' is the prefered behaviour and that button is implemented directly in the _host.cshtml. 'Test2' is what I am getting if the same button is implemented in a routable page. The tag looks like this:
<a class="btn btn-primary btn-lg" href="#" data-toggle="tooltip" data-placement="right" title="Test2">abc</a>