Remove a li item?
Remove a li item?
Hey,
-
$(document).ready(function(){
$("#add").click(function(event){
event.preventDefault();
var txt = $("#feld").val();
$("#list").append('<li id="liel">'+txt+'</li>');
});
$("#liel").click(function(event){
event.preventDefault();
$(this).remove();
alert("hello");
});
$(function() {
$("#list").sortable();
$("#list").disableSelection();
});
});
</script>
</head>
<body>
<input type="text" name="feld" id="feld"><br><a href="#" id="add">add</a><br>
<ul id="list">
<li id="liel">bla</li>
</ul>
After i added a new li item, its not possible to remove it... why?!