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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:57:00+00:00 2026-06-17T00:57:00+00:00

I have few line that listing to this script $(a.remove).click(function(){ var id = $(this).attr(‘id’)

  • 0

I have few line that listing to this script

$("a.remove").click(function(){
    var id = $(this).attr('id')
    var user = $(this).attr('value')
    $.ajax({
        success : function(){
            var url = "includes/action.php?page=access&action=remove";
            var popupmessage = "Error";
            $.post(url, { id: id },
                function(data){
                    return true;
            });
        }
    });
});

but when i add new line via jQuery it doesn’t work until refreshing the page

$("<a class=\"remove\" href=\"#\"></a>").insertAfter('#accesstable tr:last');

any idea how to fix it ?

Edit:
Working code

$('a.remove').live('click', function(){
    var id = $(this).attr('id')
    var user = $(this).attr('value')
    $.ajax({
        success : function(){
            var url = "includes/action.php?page=access&action=remove";
            var popupmessage = "Error";
            $.post(url, { id: id },
                function(data){
                    return true;
            });
        }
    });
});
  • 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-17T00:57:01+00:00Added an answer on June 17, 2026 at 12:57 am

    If you mean that your newly added anchor tag doesn’t call the same click event that you have already declared, that is because you are using the .click() function. This only adds the click event to those matching elements that are currently in the page.

    You should look at using the live() event, as this will

    Attach an event handler for all elements which match the current
    selector, now and in the future.

    So you can change to something like:

    $("a.remove").live('click', function(){ .. });
    

    Edit

    Live() is deprecated, you should now use the on() function.

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

Sidebar

Related Questions

I have this line of code: System.Drawing.Icon icon = System.Drawing.Icon.FromHandle(shinfo.hIcon); A few lines later,
Suppose I have a few lines out of wikipedia XML that looks like this:
I have a line that typically starts with a few spaces as the lines
i have vbs file with a few command line utilities that need to be
I have few question in this regard When you create an internet page, does
I have a few HTML files that I'd like to include via tags in
I want to make a little script that copies all line values obtained by
I have a few instances in my code where Style cop gives out that:
I have a CSV file that contains a line: SHIELA,ABIJAY,,,shiela@abijay.com,Shiela123,,43 123 STREET,,MEDFORD,MA ,2155,,,,617-874-4248,0,0,0,,,,,0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,20847, INAC,8101969,,,,,,,`
What I need to do is that I have few files (txt) about 2GB

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.