unable to delete row from table using jquery?

SNEH PANDYA

I just wanted to delete row from respective row. I have tried code for that you can see in JSFIDDLE.Its quite simple but still i am getting error. my code for removing tr is

$(document).ready.(function(){
 $("#table-lst-regions .deleteLink").on("click",function() {
    var tr = $(this).closest('tr');
    tr.css("background-color","#FF3700");

    tr.fadeOut(400, function(){
        tr.remove();
    });
  return false;
});
Daniil Grankin

Problem is that new added .deleteLink are not subscibed on click

You can change for example defenition for delete link with onclick attribute

<a class ="deleteLink" onclick="deleteRow(this);">

and add function delete

function deleteRow(el) {
        var tr = $(el).closest('tr');
        tr.css("background-color","#FF3700");

        tr.fadeOut(400, function(){
            tr.remove();
        });
      return false;
    }

Take a look http://jsfiddle.net/48MRf/2/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to delete a specific row of a dynamic table using JQuery

Remove Row from table using jQuery

Delete dynamically-generated table row using jQuery

delete first row from two table in html using jquery

Try to delete entire row from table using delete button in PHP

How i update and delete each row of a table using jquery

jquery shopping cart delete table row from local storage

How to delete a row from a table in SQL Server using PowerShell script?

how to delete a row from table using Angular5?

Unable to delete row from table view

Delete an entire row from a table, using MySQL

delete any table row using jQuery

Unable to delete row from html table using jquery

Unable to delete row data in my table view from sqlite

How to delete table certain table row created from dynamic dataTables using jquery?

Add/Delete row dynamically to/from jquery table using angularjs not working properly

unable to delete a row from jqgrid

To delete a row dynamically from a table using javascript

How to delete a selected row in a html table by using jQuery?

jQuery onclick delete row from mysql table

Unable to delete product from table using PHP

Delete a row from table view using custom button - Swift 3

Unable to delete a row from datatable using ajax and jquery [ajax call not working]

Unable to remove table row using jQuery

Delete row from table using Vue

How to delete the duplicates from the table using row_number() in psql?

How to delete row from table using javascript?

Delete a row from a table using and Id React

Unable to delete row using jquery which was dynamically created