yii-sidr Yii Extension for the JQuery Sidr plugin

  1. Requirements
  2. Usage
  3. Resources

This is a Yii Widget for the Sidr JQuery plugin. This plugin enables you to build slide-out menus like JPanel, but for either or both sides of the browser. Also supports touch via the TouchSwipe JQuery plugin.

Requirements ¶

Yii 1.1 or above

Usage ¶

Copy to your extensions directory, then use like so:

$this->widget('ext.yii-sidr.YiiSidr', array(
    'enableTouch'=>false, //optional: enable swipe control on touch devices
    'touchSelector'=>'.body', //optional: swipe selector
    'theme'=>'dark',
    'sidrs'=>array(
        array(
            'btnName'=>'#leftNavBtn',
            'name'=>'leftNav',
            'side'=>'left',
            'speed'=>'', //optional: A string or number determining how long the animation will run.
            'source'=>'', //optional: A jQuery selector, an url or a callback function.
            'renaming'=>'', //optional: When filling the sidr with existing content, choose to rename or not the classes and ids.
            'body'=>'', //optional: For doing the page movement the 'body' element is animated by default, you can select another element to animate with this option.
            'displace'=>true, //optional: Displace the body content or not.
            'onOpen'=>'function() {}',  //optional: Callback that will be executed on open.
            'onClose'=>'function() {}', //optional: Callback that will be executed on close.
        ),
        array(
            'btnName'=>'#rightNavBtn',
            'name'=>'rightNav',
            'side'=>'right',
        ),
    )
));

Resources ¶

1 0
2 followers
176 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: Todd Anstis Todd Anstis
Created on: Dec 29, 2014
Last updated: 11 years ago

Downloads

show all

Related Extensions