fixed js callback for slider