set item active when scroll > init and optimization