This is a Yii implementation of the HoverScroll jQuery Plugin.
It makes an unordered list scrollable by hovering the mouse over it. Lists can be either horizontal or vertical as well.
Requirements ¶
This has been tested with 1.1.8, but should work with any version.
Usage ¶
To use this extension, you must first create an array of items to display. Each item must be another array with an HTML attribute, as well as height and width attributes (in pixels).
$items = array(
array(
'height' => 48,
'width' => 64,
'html' => '<img src="path/to/image" alt="Example" />',
),
...
);
Next specify any parameters you would like to pass to the list. The following are the defaults:
$options = array(
'vertical' => FALSE, // Display the list vertically or horizontally
'width' => 400, // Width of the list container
'height' => 50, // Height of the list container
'arrows' => TRUE, // Display direction indicator arrows or not
'arrowsOpacity' => 0.7, // Max possible opacity of the arrows
'fixedArrows' => FALSE, // Fixed arrows on the sides of the list (disables arrowsOpacity)
'rtl' => FALSE, // Print images from right to left
'debug' => FALSE, // Debug output in the firebug console
);
And then finally render the widget in your view:
$this->widget('ext.hoverscroll.EHoverScroll', array(
'items' => $items,
'options' => $options,
));
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.