| Main class to handle a carousel of elements in a page. |
| |
| Can be horizontal or vertical, horizontal by default |
| Selector of previous button inside carousel element, “.previous_button” by default, set it to false to ignore previous button |
| Selector of next button inside carousel element, “.next_button” by default, set it to false to ignore next button |
| Selector of carousel container inside carousel element, “.container” by default, |
| Define the maximum number of elements that gonna scroll each time, auto by default |
| Define the suffix classanme used when a button get disabled, to ‘_disabled’ by default Previous button classname will be previous_button_disabled |
| Define the suffix classanme used when a button has a rollover status, ‘_over’ by default Previous button classname will be previous_button_over |
| |
| DOM element containing the carousel |
| DOM id of the carousel’s element |
| DOM element containing the carousel’s elements |
| Array containing the carousel’s elements as DOM elements |
| DOM id of the previous button |
| DOM id of the next button |
| Define if the positions are from left or top |
| Define if the dimensions are horizontal or vertical |
| Size of each element, it’s an integer |
| Number of visible elements, it’s a float |
| Define whether the carousel is in animation or not |
| List of events fired by a carousel |
| Fired when the previous button has just been enabled |
| Fired when the previous button has just been disabled |
| Fired when the next button has just been enabled |
| Fired when the next button has just been disabled |
| Fired when a scroll has just started |
| Fired when a scroll has been done, memo.shift = number of elements scrolled, it’s a float |
| Fired when the carousel size has just been updated. |
| |
| Constructor function, should not be called directly |
| |
| |
| |
| Fires a carousel custom event automatically namespaced in “carousel:” (see Prototype custom events). |
| Observe a carousel event with a handler function automatically bound to the carousel |
| Unregisters a carousel event, it must take the same parameters as this.observe (see Prototype stopObserving). |
| |
| Check scroll position to avoid unused space at right or bottom |
| Scrolls carousel from maximum deltaPixel |
| Scrolls carousel, so that element with specified index is the left-most. |
| Update buttons status to enabled or disabled Them status is defined by classNames and fired as carousel’s custom events |
| |
| Return elements size in pixel, height or width depends on carousel orientation. |
| Returns current visible index of a carousel. |
| Returns the current position from the end of the last element. |
| Returns the current position in pixel. |
| Returns the current size of the carousel in pixel |
| Should be called if carousel size has been changed (usually called with a liquid layout) |