See [HERE][1]!!!
http://jsfiddle.net/y5gbg/
When I type something, it should append a round div and text. When I click this round div, it should be removed.
This is jquery code:
$(document).ready(function(){
$("button").click(function(){
var str;
str = $('input').val();
var sth;
sth = '
'+str+'
';
$("#contents").append(sth);
});
$('.btn').click(function(){
var id;
id = $(this).attr('alt');
$('#'+id).remove();
});
});
But it doesn't work. Could someone tell me why?
Another thing, how to do linebreak here?
Thanks!!!
[1]: http://jsfiddle.net/y5gbg/