jqueryexpander Expand and Collapse HTML content

  1. Usage
  2. Resources

The Expander Plugin hides (collapses) a portion of an element's content and adds a "read more" link so that the text can be viewed by the user if he or she wishes. By default, the expanded content is followed by a "read less" link that the user can click to re-collapse it. Expanded content can also be re-collapsed after a specified period of time. The plugin consists of a single method, .expander(), with a bunch of options.

Usage

$this->widget('ext.expander.Expander',array(
            'content'=>'Content',
            'config'=>array()
        ));

$this->widget('ext.expander.Expander',array(
            'content'=>$model->description,
            'config'=>array('slicePoint'=>600, 'expandText'=>'read more', 'userCollapseText'=>'read less', 'preserveWords'=>false)
        ));

Resources

2 0
5 followers
380 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: User Interface
Developed by: delancer
Created on: Dec 26, 2012
Last updated: 11 years ago

Downloads

show all

Related Extensions