Delete button no responding and not remove record
-
I try more time to delete record by jquery but no responding meaning nothing happen my code as following <html> <head> <meta name="viewport" content="width=device-width" /> <title>Index</title> <script src="~/Scripts/jquery-1.10.2.js"></script> <script> $(function () { $("#btn").click(function () { var x = $("#txt1").val(); var y = $("#txt2").val(); var z = $("#txt3").val(); $("#tb").append(" " + x + " " + y + " " + z + " <input type='button'value='Delete'/> <input type='button'value='Edit'/>"); }); $("#tb").on("click", ".c", function () { $(this).parent().parent().remove(); }); }); </script> </head> <body>
ID<input type="text" id="txt1" />
Name<input type="text" id="txt2" />
Country<input type="text" id="txt3" />
<input type="button" value="add" id="btn" />ID
Name
Country
<input type="button" class="c" value="Delete" />
Edit
</body> what remaining in my code or wrong to button delete work
-
I try more time to delete record by jquery but no responding meaning nothing happen my code as following <html> <head> <meta name="viewport" content="width=device-width" /> <title>Index</title> <script src="~/Scripts/jquery-1.10.2.js"></script> <script> $(function () { $("#btn").click(function () { var x = $("#txt1").val(); var y = $("#txt2").val(); var z = $("#txt3").val(); $("#tb").append(" " + x + " " + y + " " + z + " <input type='button'value='Delete'/> <input type='button'value='Edit'/>"); }); $("#tb").on("click", ".c", function () { $(this).parent().parent().remove(); }); }); </script> </head> <body>
ID<input type="text" id="txt1" />
Name<input type="text" id="txt2" />
Country<input type="text" id="txt3" />
<input type="button" value="add" id="btn" />ID
Name
Country
<input type="button" class="c" value="Delete" />
Edit
</body> what remaining in my code or wrong to button delete work
i think you are missing 'closing script tag'