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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:21:17+00:00 2026-06-03T05:21:17+00:00

I have made myself a list adder. When you click the link, it adds

  • 0

I have made myself a list adder. When you click the link, it adds a div. I am trying to add the current text of the input into the innertext of the div, then append it. After it is added, i want the text to clear in the input. I have tried this http://jsfiddle.net/Hunter4854/hwbcs/2/ but I am stuck, and have no idea how to fix 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-06-03T05:21:18+00:00Added an answer on June 3, 2026 at 5:21 am

    The first problem is, you’re getting the value of txt only when the page loads, so the variable will always contain an empty value.

    The second problem is, you’re actually trying to write txt to this.innerText. That’s a double mistake, because this in that context is the link clicked, and jQuery has no .innerText (there’s .text and .html).

    Last, to clear the input, just use $('input').val('');. Passing an empty string to .val() sets the input text to that string.

    Here’s a working version.

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

Sidebar

Related Questions

I have several libraries made by myself (a geometry library, a linked list library,
Visual Studio 2010 Express, Windows Forms. Have made myself my first little application which
I'm trying to help someone with their Debian server. They have Plesk. I made
I have a path made up of a list of 2D points. I want
I have this problem with openGL ES 1.1 on iPhone. I have made myself
I have made an application (for my self) for feeds reading, using SyndicationFeed ,
I have a problem with my self-made search page. There is 2 tables: **name
I have made a simple html page with an image on it to display
I have made a debugger for the websites i develop that i simply include
I have made an asp.net page which executes a long sp. lets say the

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.