Add missing js code for slider