Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5981595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:57:57+00:00 2026-05-22T21:57:57+00:00

Im doing an ajax call, that does the following on success: success: function(data) {

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T21:57:58+00:00Added an answer on May 22, 2026 at 9:57 pm

    cant you simply use the jquery trigger() function ?

    $('#share_text').trigger('mouseenter'); // to show it
    $('#share_text').trigger('mouseleave'); // to hide it
    

    Don’t forget to first attach the tipsy() behaviour to #share_text before running the above code.

    $('#share_text').tipsy();
    

    In your code it should look like this:

    $(function(){
    
    // things to do on document.ready:
    $('#share_text').tipsy();
    // ... more stuff
    
    // ... until your ajax callback
    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");
    // simulate a mouseenter event on share_text, to launch tipsy().show
       $('#share_text').trigger('mouseenter');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doing odd/even styling with jQuery is pretty easy: $(function() { $(.oddeven tbody tr:odd).addClass(odd); $(.oddeven
Hey, I am doing to AJAX call to flickr.interestingness.getList to get the interesting pictures
I've been doing a lot of reading about AJAX, and wanted to know which
Ok, I'm doing a bunch of RIA/AJAX stuff and need to create a pretty,
When doing an INSERT with a lot of data, ie: INSERT INTO table (mediumtext_field)
When doing TDD , how to tell that's enough tests for this class /
I doing a function in Javascript like the VisualBasic DateDiff. You give two dates
When doing a simple performance measurement, I was astonished to see that calling String.IndexOf(char)
I want to call three functions someTask1 , someTask2 and someTask3 in that order.
When doing small icons, header graphics and the like for websites, is it better

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.