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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:53:02+00:00 2026-06-08T08:53:02+00:00

I have data which are returned from my controller and thouse results are properly

  • 0

I have data which are returned from my controller and thouse results are properly displayed as json inside js which appends div inside my view to show these data.
Now I have problem that with every click div is appended to +1 row to show same data.
How to delete these div on click action before appending new div.

 success: function (result) {
            var data = null;
            $.each(result, function (i, item) {
                data = '<div>' + item.Id + ' ' + item.Title + '</div>';
                $("#tab-" + item.PropertyType).append(data);
            });
  • 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-08T08:53:04+00:00Added an answer on June 8, 2026 at 8:53 am

    Before you add a new set of divs you can delete all divs which have a parent div
    whose name is starting with “tab-“

    success: function (result) {
            var data = null;
            $("[id^='tab-'] div").remove();
            $.each(result, function (i, item) {
                data = '<div>' + item.Id + ' ' + item.Title + '</div>';
                $("#tab-" + item.PropertyType).append(data);
            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have list of objects which are returned from mvc controller as Json. I'm
I have one main array which is the returned data from a MySQL query
I am getting JSON string from website. I have data which looks like this
A] Problem summary: I have JSON data being returned from python to javascript. I
I have a loop which parses JSON that is returned from a remote server,
I have such XML structure which was returned by SharePoint web services. <rs:data ItemCount=4
I'm using knockoutjs and the mapping plugin to generate view models from JSON returned
I have data which resembles the following: D.STEIN,DS,01,ALTRES,TTTTTTFFTT D.STEIN,DS,01,APCASH,TTTTTTFFTT D.STEIN,DS,01,APINH,TTTTTTFFTT D.STEIN,DS,01,APINV,TTTTTTFFTT D.STEIN,DS,01,APMISC,TTTTTTFFTT D.STEIN,DS,01,APPCHK,TTTTTTFFTT D.STEIN,DS,01,APWLNK,TTTTTTFFTT
I have data which resembles the following: D.STEIN,DS,01,ALTRES,TTTTTTFFTT D.STEIN,DS,01,APCASH,TTTTTTFFTT D.STEIN,DS,01,APINH,TTTTTTFFTT D.STEIN,DS,01,APINV,TTTTTTFFTT D.STEIN,DS,01,APMISC,TTTTTTFFTT D.STEIN,DS,01,APPCHK,TTTTTTFFTT D.STEIN,DS,01,APWLNK,TTTTTTFFTT
I have some data which (quite reasonably) uses null and false for different meanings.

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.