How to temporarily stop title attribute from tooltip?

I have a popup showing on the rightclick (I know this violates the expected functionality, but Google Docs does it this way, why not?) However, the element in which I display my popup has a set of attributes "title", which appears the top of my div. I still want the tooltip to work, but not where the popup is.

What is the best way to stop the tooltip while the popup is open / open?

Edit: I am using jQuery

+5
source share
4 answers

With jquery you can associate a hover function to also set the title attribute in onmouseover and then reset on the mouse from.

$("element#id").hover(
 function() {
  $(this).attr("title","");
  $("div#popout").show();
 },
 function() {
  $("div#popout").hide();
  $(this).attr("title",originalTitle);
 }
);
+4
source

Here is another example of how this can be done using datato store values ​​and propto assign a value

$('[title]').on({
    mouseenter : function()
    {
        $(this).data('title', this.title).prop('title', '');
    },
    mouseleave: function()
    {
        $(this).prop('title', $(this).data('title'));
    }
});
+3
source

, , . , .

+1

, title. :

$('a').hover(function() {

    $(this).attr('title', '');

});

.

+1

All Articles