<div contenteditable='true' data-bill-id='xxx' class='notes'></div>
$('.notes').blur(function(e){
$.ajax({
url: "/bill/notes",
method: 'post',
data: {id: $(e.target).data('bill-id'), notes: $(e.target).text()},
error: function(res){
alert('error. please refresh the page and try again.');
}
});
});
$('.notes').keypress(function(e){
if (e.keyCode == 13) {
$(e.target).blur();
return false;
}
});