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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:37:06+00:00 2026-05-26T04:37:06+00:00

Hi everyone I have been working on this particular problem for ages by now,plz

  • 0

Hi everyone I have been working on this particular problem for ages by now,plz help.
I have looked at jQuery: Refresh div after another jquery action?
and it does exactly what I want but only once! I have a table generated from db and when I click on delete it deletes the row and refreshes the div but after which none of my jquery functions will work.

$('#docs td.delete').click(function() {
    $("#docs tr.itemDetail").hide();
    var i = $(this).parent().attr('id');

    $.ajax({
        url: "<?php echo site_url('kt_docs/deleteDoc'); ?>",
        type: 'POST',
        data: 'id=' + i,
        success: function(data) {
            $("#docs tr.itemDetail").hide();
            $("#f1").html(data); //    wont work twice            
            //$("#docs").load(location.href+" #docs>*"); //works once as well
        }
    });
});

in my body I have

<fieldset class='step' id='f1'>
    <?php $this->load->view('profile/docs_table'); ?>
</fieldset>

profile/docs reads data from db. <table id='docs'>....</table>
and my controller:

function deleteDoc() {
    $id = $_POST['id'];
    $this->load->model('documents_model');
    $del = $this->documents_model->deleteDocument($id);    
    return $this->load->view('docs_table');
}

Thanks in advance!

  • 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-26T04:37:07+00:00Added an answer on May 26, 2026 at 4:37 am

    Are you removing any expressions matching $(‘#docs td.delete’) anywhere? If so, consider using $.live(), which will attach your function to ALL matching elements regardless of current or in the future; e.g.

    $('#docs td.delete').live('click', function() {
        // Do stuff.
    });
    

    http://api.jquery.com/live/

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

Sidebar

Related Questions

Now I do have a hw question for everyone...I've been staring at this for
Good day everyone. I have been having the same problem all day at work
Well I have a very rough version of gomoku working now. I'm using Jquery,
I have been working on this project for my job, which involves backing up
I have been working with ASP.NET MVC for a couple of months now and
Yo everyone! I have been working on an Isometric Tile Game Engine in HTML5/Canvas
I have been working on a coding problem for some pages I inherited where
It has been asked when MeteorJS will have auth in place... I think everyone
Hello everyone I have a problem. I want to do a GridView with a
Hi everyone my problem today is I have a couple of buttons that slide

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.