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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:57:49+00:00 2026-06-04T05:57:49+00:00

JQuery’s .slideUp() doesn’t work after .append() is used to append value of textarea to

  • 0

JQuery’s .slideUp() doesn’t work after .append() is used to append value of textarea to the div.

HTML:

<html>
    <body>
        <div id="cont">
            <textarea id="txt"></textarea>
            <button onclick="click()">Click</button>
        </div>
    </body>
</html>

JavaScript:

function click(){
    var txt = $('#txt').val();
    var html = document.createElement('div');
    $(html).hide().html(txt);
    $('#cont').append(html);
    $(html).slideUp(500);
}

I can’t figure out what the problem is because when I used .show() instead of .slideUp() it works fine.

  • 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-06-04T05:57:50+00:00Added an answer on June 4, 2026 at 5:57 am

    well…slideDown let the element be shown and slideUp let it be hidden. try

        $(html).slideDown(500)
    

    @ Philip Hardyhis saying: fixes my problem. However, is there a way to have it slide up from the bottom without having to use .animate()

    i don’t think so, but I think it would be pretty easy:
    just put a div-element inside of the html (with $(html) it will be hard to handle) lets call it “myDiv” and put every content of the html in myDiv

    then move the div outside of the window and do the animation (note to move it outside at the bottom you need to temporary disable scrolls of window)

    $(document).css('overflow','hidden');
    $("#myDiv").css({'top':$(document).height(), 'opacity':'0'});
    /*outside of the window and transparent*/
    $("#myDiv").animate({
        'opacity':'1',
        'top':'0'
    },2000, function(){$(document).css('overflow','auto');});
    

    i think it should work like this

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

Sidebar

Related Questions

jQuery 1.4: $('#menu li:last:not(.ignore)').addClass('last'); HTML: <div id=menu> <ul> <li>item 1</li> <li>item 2</li> <li class=ignore>item3</li>
jQuery $(div span[z*='w']:last-child).css({color: red}); and the html <div> <span z=ww>Sam</span> <!-- Didn't works -->
jQuery 1.7.1, jQuery UI tabs. I have the following HTML representing tabs, <div id=tabs>
jQuery $(#myID).each(function() { $(this).dosomething; }); HTML: <div id=myID> <div class=myClass>content</div> </div> How do I
jQuery(document).ready(function(){ var panelContainer = jQuery('div#panels'); jQuery('<div id=tabs></div>').insertBefore(panelContainer); panelContainer.find('div.panel').each(function(n){ jQuery('div#tabs').append('<a class=tab href=#' + (n+1) +
jQuery's draggable functionality doesn't seem to work on tables (in FF3 or Safari). It's
jQuery("body").dblclick(function(event){ var x = event.pageX - this.offsetLeft; var y = event.pageY - this.offsetTop; jQuery("<div></div>").addClass("node").css("position","absolute")
jQuery(a).not(div#mnuMain a).live(click, function(event){ event.preventDefault(); alert(yes I got u); }); How to make it work?
jQuery hyperlinks - href value? text][1] I am running in to a problem using
jQuery's getScript function doesn't seem to support an error callback function. I can't use

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.