Thanks a lot Novice Rambo :)
I did some changes to make it works:
<script type="text/javascript">
isLoadingTime = true;
//Enable Drag and drop
$(function(){
$('#tt').tree({
dnd: true,
url: 'get_activite_data.php',
cascadeCheck: true,
onLoadSuccess: function(node,data){
$('#tt').tree('expandAll');
isLoadingTime = false;
},
onCheck: function(node,checked){
if (isLoadingTime) {
return;
}else{
//here the function to update db when user click manually
}
}
});
});
</script>