devide js for widget