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

  • SEARCH
  • Home
  • 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

I have the following jQuery ajax call setup: function Testing() { var result =
I have a simple ajax call: $.ajax({url: my_url_here, dataType: 'text', success: function(data, textStatus) {
I am doing an AJAX call that returns some HTML and jQuery: <div id='selected'>Here
I'm doing a jQuery AJAX post like this: var form = $(#formid); form.submit(function() {
I've got the following code: <script type=text/javascript> $(function(){ $(#AddMaps).submit(function(){ var $form = $('#AddMaps'); $.ajax({
In my JS I have the following ajax call, that bind the resulting json
Doing an ajax call to a page to grab 5 pieces of data. 3
I am doing an Ajax call and on response I would like to hide
i am doing an ajax call and i refresh a partial view. Inside the
Doing an ajax get request works as expected using the following code: $.ajax({ type:

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.