1

Using jQuery, I have implemented tooltip in my html. Now I want to style my tooltip.

How can I do that?

My JavaScript code for the tooltip is this:

$('.bootstrap-switch-handle-on').hover(function () {
    $(this).css('cursor', 'pointer')
           .attr('title', 'This is a hover text.');
}, function () {
    $(this).css('cursor', 'auto');
});

Thanks

John Slegers
  • 45,213
  • 22
  • 199
  • 169
Utpal
  • 805
  • 4
  • 15
  • 44

1 Answers1

0

It looks like you are just adding the title attribute to the .bootstrap-switch-handle-on element. The subsequent "tooltip" is generated by the browser and cannot be styled. If you are using Bootstrap, you can use their built in Tooltip which can be styled with CSS. http://getbootstrap.com/javascript/#tooltips

sn3ll
  • 1,629
  • 1
  • 10
  • 16