continue to tomorrows question
function n() {
$('.m').on('click',function() {
var id = $(this).closest("tr").find(".t").text();
var p= $(this).closest("tr").find(".t1").text();
$('#c').append('<li class='li'>',id,<span class='c'>'"X"'</span>','</li>');
});
}
<style>
.c:hover
{
color:red;
}
.li
{
}
<script type="text/javascript">
$(document).on('click','.c',function()
{
$(this).closest("li").remove()
alert("ok");
});
</script>
on clicking this 'X' symbol i want to delete that list,'OK' in alert printed but remove function not working why?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…