1
Galera montei um sisteminha de Tooltip bem simples usando jQuery e css.
They’re introducing the standard Tooltip when you mouse over it. This only happens in old IE, Safari and Chrome.
Look at the photo of the error:
Can anyone help me? Follow the code below.
$(document).ready(function () {
$('.masterTooltip').hover(function () {
var title = $(this).attr('title');
$(this).data('tipText', title).removeAttr('title');
$('<p class="tooltip"></p>')
.html(title)
.appendTo('body')
.fadeIn('fast');
}, function () {
$(this).attr('title', $(this).data('tipText'));
$('.tooltip').remove();
}).mousemove(function (e) {
// Get X Y coordinates
var mousex = e.pageX + 20;
var mousey = e.pageY + -25;
$('.tooltip').css({top: mousey, left: mousex});
});
});
.tooltip {
display:none;
position:absolute;
border:1px solid #616161;
background-color:#323232;
border-radius: 4px;
padding:10px;
color:#FFFFFF;
}
.tooltip::after{
position: absolute;
content: '';
left: -20px;
top: 3px;
border: 10px solid transparent;
border-right-color: #323232;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<p class="masterTooltip" title="bla,bla,bla,bla">qeqweqweqweqqw</td>
Good really the problem of blinking has been solved, but the original problem continues, try to put the title in an image for example.
– Hugo Borges
I edited the post with the image test, here I simulated the browsers: Internet Explorer 8, 9, 10 and 11 with my Microsoft Edge, your example is with the problem cited in the browsers IE 8 to 10. However the test with the corrections I made did not present the reported problem. Could you tell me which browser you are using to visualize the problem? Test it by "running" here from Stackoverflow. in case of no problems and your code continues giving, we have to check more deeply what could be causing this.
– Aldo Fernandes Junior
I use the safari
– Hugo Borges
I tested with safari on a mac, and it worked normally, you came to test directly here by simulation stack overflwo code or you put the script on your site and tested by it?
– Aldo Fernandes Junior
hahahahah, it was my mistake here. sorry. Your code worked 100%. Thank you so much for your help.
– Hugo Borges