qtip2 close button without a title bar
Asked Answered
A

1

8

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.

Arteritis answered 25/5, 2012 at 17:44 Comment(0)
C
1

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!

Cristicristian answered 18/6, 2013 at 11:0 Comment(1)
Edited my answer to understandCristicristian

© 2022 - 2024 — McMap. All rights reserved.