Closed eipark closed 8 years ago
You can if you pseudo it up with a :before selector. This issue was presented by me a few months ago. I required tooltips on a contextual basis, whether or not the user wanted tooltips.
$('.data-hint-class:before').hide()/show()
This worked.
@taystack could you elaborate on this a bit? Also, I need to be able to change the text of the hint dynamically. Not sure if that changes things.
I would need no know the context of the code. If you fiddle they will come. On Jan 28, 2014 1:46 PM, "Ernie" notifications@github.com wrote:
@taystack https://github.com/taystack could you elaborate on this a bit? Also, I need to be able to change the text of the hint dynamically. Not sure if that changes things.
Reply to this email directly or view it on GitHubhttps://github.com/chinchang/hint.css/issues/67#issuecomment-33530340 .
Basically on a click event, I replace the data-hint prop with some other string and then show the tooltip for a few seconds and then hide. Whenever the data-hint changes I want to show it without the user having to hover with their mouse.
Something like this ideally:
$("#something").on('click', function() {
$(".hint-class").attr("data-hint", "some other text").show()
setTimeout($(".hint-class").hide(), 2000)
});
I'm not sure if this is possible, but it'd be nice to show/hide the hover programatically with javascript. Something along the lines of
$(".data-hint-class').show()/.hide()