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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:12:37+00:00 2026-05-24T18:12:37+00:00

I am ajaxing in some text from a PHP script and trying to have

  • 0

I am ajaxing in some text from a PHP script and trying to have it fade in to the page. However, I can’t get the fadeIn() function to behave. Here’s where I am:

<script type="text/javascript">
    $(document).ready(function(){
        $("#generate").click(function(){
            $("#quote p").load("sendText.php");
        });
    });
    </script>

<input type="submit" style="background-image: url(hitmebutton.png); height:8em; width:23em;" id="generate" value=""><br />
    <div id="quote"><p></p></div>

So sendText.php echos out some text. To get it to fade in when the button is clicked, I tried just doing

$("#quote p").load("sendText.php").fadeIn();

I also tried doing

$("#generate").click(function(){
        $("#quote p").load("sendText.php");
        $("#quote p").fadeIn();
    });

But neither worked. How do I get fadeIn() to apply? I feel like there’s something small I’m missing.

  • 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-24T18:12:37+00:00Added an answer on May 24, 2026 at 6:12 pm

    I assume you want to fade in the text when it is loaded. Furthermore, for fadeIn to work, the element must be hidden first. Try:

    $("#quote p").load("sendText.php", function(){
        $(this).hide().fadeIn();
    });
    

    You could also hide the element before you load the content.

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

Sidebar

Related Questions

I'm ajaxing an array of images from a file with php opendir function .
I have the following function which is for ajaxing in a page and the
I'm ajaxing some search results onto a page, and trying to do stuff when
I have a page where I want to display some points on map. I
I have some Ajaxing going on and I have 2 blocks of source code.
I have a simple form: <form id=formTest name=formTest action= method=get> <input id=txtPostcode name=Postcode type=text
I'm making a call to a PHP script that returns a random element from
I'm ajaxing my content and can't figure out why i can't pass a variable
I see thousands of posts that have to do with ajaxing wordpress but none
I have a gallery of images that I'm ajaxing in and I'd like to

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.