Here's one way to do it:
$("#movable").click(function () {
if ($("#movable").is(':checked')) {
$("#cont > #text").data('destroyed', false).draggable({
scroll: true,
containment: '#cont'
});
}
else {
$("#cont > #text").data('destroyed', true).draggable("destroy");
}
});
$("#text").click(function () {
var isDestroyed = $("#cont > #text").data('destroyed');
});