rewrite slider directive