Im doing an ajax call, that does the following on success:
success: function(data) {
var allok= data.success;
if(allok == true) {
$("#share_text").addClass('share_success').delay(2000).queue(function(next){
$(this).removeClass("share_success");
next();
});
} else {
$("#share_text").addClass('share_fail').delay(2000).queue(function(next){
$(this).removeClass("share_fail");
next();
});
}
$('#share_message').html(data.message);
$("#share_submit").val("Share");
$("#share_submit").removeAttr("disabled")
}
Where allok = false
(the else block) it should trigger the tipsy tooltip below this text box, while its doing addClass/removeClass.
<input name="whatever_name" id="share_text" type="text" value="Blah blah" size="40" title="This is a tooltip">
If I add $('#share_text').tipsy('show')
into the else block, it works only when you mouseover the text box. How do I get it to show by itself?