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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:13:52+00:00 2026-05-26T18:13:52+00:00

I update the html with ajax call. I need to add element as hidden

  • 0

I update the html with ajax call. I need to add element as hidden and then apply animation:

$.ajax({
    success: function (data, textStatus) {
        $(".comments").prepend(data);
        $(".comments .comment-frame:first").slideDown("slow"); // it doesn't work, since element is visible

Data added:

<div class="comment-frame">
...
</div>

I can not modify css to make class comment-frame hidden, since I already have other elements on the page with the same class, which should remain visible. So, somehow I should add that data as hidden. How can I do it?

  • 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-26T18:13:52+00:00Added an answer on May 26, 2026 at 6:13 pm

    You can make a jQuery object out of data and .hide() it before .prepend()ing it to $(".comments").

    $.ajax({
        success: function (data, textStatus) {
            var $data = $(data).hide();
            $(".comments").prepend($data);
            $(".comments .comment-frame:first").slideDown("slow");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make an Ajax call and have the response update a child
I need to update a section on my site frequently using ajax, jquery, and
I updates a div content with some html via an ajax call, and I
I need to call a web and retrieve the resulting data from the model
I've got a checkout page which has some ajax calls that update hidden fields
I am trying to add the same ajax call that gets triggered when a
I have working Ajax call. Now I need to parametrize it as the same
Hi I am trying to update a div with some html from another div.
I am currently asynchronously fetching json documents to update elements in a few html
12:18:55,541 INFO [UpdateChecker] New update(s) found: 2.0.0 [ http://ehcache.org/news.html] How do I suppress ehcache

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.