var addClose = function() {
$('#edit').click(function() {
q = $('#question div label');
q.html('<textarea rows=10> ' + q.text() + '</textarea>');
$('#edit').text('Close');
edit = $('#edit');
edit.attr('id', "close");
addEdit();
});
};
var addEdit = function() {
$('#close').click(function() {
text = $('#question textarea').val();
label = $('#question label');
label.html(text);
close = $('#close');
close.text('Edit');
close.attr('id', "edit");
addClose();
});
};
addClose();