added whenScrolled directive