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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:08:35+00:00 2026-05-26T12:08:35+00:00

Im trying to create a facebook style newsfeed. Using jquery, I’ve managed to set

  • 0

Im trying to create a facebook style newsfeed. Using jquery, I’ve managed to set it up so that users can add new newsitems and then delete them without refreshing the page. The delete function works fine on the news items that I have added directly into the HTML, but I can’t delete items that I have dynamically created using the textfield.

This is a pretty complicated problem, so I recreated it on jFiddle: http://jsfiddle.net/Gefgj/

  • 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-26T12:08:35+00:00Added an answer on May 26, 2026 at 12:08 pm

    To make it work for the dynamically added entries, change this line:

    $('.delete_news_item').click(function(){
    

    to this:

    $('.delete_news_item').live('click', function(){
    

    Or if you’re using jQuery 1.7, you can use the new `.on()’ method.

    You can see it work here: http://jsfiddle.net/jfriend00/tbaAU/

    .live('click', ...) will hook up to newly created items as well as pre-existing items. .click(...) will only hook up to items that exist at the time you run that line of code. See the jQuery doc for .live() for more info or the jQuery doc for .on.

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

Sidebar

Related Questions

I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Using the Roles dashboard, I can create Facebook test user accounts but when trying
I'm trying to create my first application for facebook using MVC, but can't decide
I'm trying to add a create Facebook event functionality to my application that uses
I'm trying to create a Facebook canvas app that allow users to write a
I am trying to create a Facebook i like don't like functionality using jQuery.
I am trying to create Facebook based login using Javascript. Once a person clicks
In my facebook game I'm trying to create a system where a user can
I am trying to create events on Facebook using Facebook connect. So far, the
I'm trying to create a basic system that will allow only specific users 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.