Click event is Firing only at first time

Click event is Firing only at first time

I am having problem with jquery-1.9.1.min.js. 

This is simple task, it dynamically add and remove textboxes using click event, If i use  jquery-1.9.1.min.js it only fires at first time  

see the demo


but if i use  jquery-1.4.1.min.js the task works fine, 


What's is the problem with my below coding

<script src='jquery-1.9.1.min.js'></script>

<div id="advice" style="width: 300px; height: auto;">
<p>Advice :</p>
<div class='space' id='input_1'>
<input id="input_1" type="text" name="txtval[]" class='left'/>
<img class="add right" src="add.png" />
</div>
</div>

<script>
$('document').ready(function(){
    var id=2,txt_box;
$('.add').on('click',function(){
     //alert("thank you add");
 $(this).remove();
 txt_box='<div class="space" id="input_'+id+'" ><input type="text" class="left"/><img src="remove.png" class="remove"/><img class="add right" src="add.png" /></div>';
 $("#advice").append(txt_box);
 id++;
});

$('.remove').on('click',function(){
       var parent=$(this).parent().prev().attr("id");
var parent_im=$(this).parent().attr("id");
$("#"+parent_im).slideUp('medium',function(){
$("#"+parent_im).remove();
if($('.add').length<1){
$("#"+parent).append('<img src="add.png" class="add right"/> ');
}
});
});


});
</script>