update beforeAjax example