Fixed JS error with Horizontal slide() method