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 3789948
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:14:17+00:00 2026-05-19T12:14:17+00:00

This code hides #title, sets the text, then fades it in. $(‘#title’).fadeOut(0).text(data.name).fadeIn(); Is there

  • 0

This code hides #title, sets the text, then fades it in.

$('#title').fadeOut(0).text(data.name).fadeIn();

Is there a better way to do the fadeOut(0) part?

  • 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-19T12:14:17+00:00Added an answer on May 19, 2026 at 12:14 pm

    If you just want to hide the element instantly, then fade it in with new text, do this:

    $('#title').hide().text(data.name).fadeIn();
    

    If instead you want it to animate, your code doesn’t wait for anything to happen: it starts to fade in, then sets text instantly, and then fades out (without waiting for anything to finish).

    Use callbacks, which are anonymous functions which get called after the parent function has executed completely:

    $('#title').fadeOut(function() {
      $(this).text(data.name).fadeIn();
    });
    

    I really wish jQuery’s functions could be chained that easily…

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: <input type=hidden id=editorTitle name=title value=home> <textarea name=text id=editorText></textarea> But when
I have this code, $('.editLayout #changeLayout').click(function() { $('html').height($(document).height()); $('#fluidWrap').hide('scale'); $.ajax({ data: { mainLayout: true
SO this is my code so far: JS: <script type=text/javascript> function Hide(srcField) { var
I have this code: function beforemouseout() { if ($(this).val() == '') { $(this).val($(this).attr('title')); }
I have right now this code: <ul><li class=listitem>text<li></ul> jQuery: $('.listitem').click(function() { $(#elname).text($(this).text()); $('#slists').css('visibility','hidden') $('#elname').css('visibility','visible')
This shows the code that hides slides the photograph thumbails away etc when the
I have this code that Show/Hide a text box if I select a category
Sorry about the title name I didn't know how to explain this lol.. Basically,
ok i have this code: <html> <head> <script src=js/jquery.js></script> <script type=text/javascript> function ps() {
I have this code which I need to set a unique title : var

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.