Fixed the slider component to be compatible with newer jQuery versions 

The current code doesn't work correctly with jQuery 1.9.x. The proposed fix works correctly even with newer jQuery releases.