Update application js for jQuery UI Slider

It will also consider the steps while calculating the segments and also no need to pass the arguments to the function.