I wanted to change default style of the bootstrap's tooltip, and i was able to do that after following W3Schools article. That article as well as other SO post suggest to use something like below
/* Tooltip on top */
.test + .tooltip.top > .tooltip-arrow {
border-top: 5px solid green;
}
which means i have to add test
class on tooltip element. But i want all the tooltips to have same style so i decided not to add test
class
My working JSFiddle is here
However, in order to get custom styling working i have to initialize toolips using javascript
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
If i remove this javascript, tooltips still works but does not show custom styling.
So tooltip works regardless if i initialize it using javascript or not, however custom styling only works if initialize it using javascript. Why?