Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

qtip2 close button without a title bar

Tags:

qtip2

I would like to have a qtip2 tooltip without a title bar, but with a close icon in the corner. Is there a way to spec that, or do I have to muck with the code that creates it? I am thinking of something that floats the button to the left or to the right, allowing the rest of the content to fill the tooltip div.

like image 629
Gene Golovchinsky Avatar asked May 25 '12 17:05

Gene Golovchinsky


1 Answers

Always keep the close markup separately and update with your current qTip Text.

$('.selector').qtip({
    content: {
        text: function(api) {
          var qTipContent = $('.close-markup').html();
          qTipContent += $('.qtip-content').html();
          return $('.qtip-content').html();
        }
    }
});
$('.close-markup').qtip('destroy');

Try the above code.

Note: Does not require to muck the qTip Close code snippet!

like image 65
Venkat.R Avatar answered Jan 02 '23 09:01

Venkat.R