Fork me on GitHub

SimpleModal widget

Add SimpleModal jQuery plugin widget.

Usage

$this->widget('ext.yiiext.widgets.simplemodal.ESimpleModalWidget', array(
 
    // trigger element selector
    'selector'=>'#open_modal_link',
 
    // the dialog HTML content
    'content'=>'<div class="mywindow">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</div>',
 
    // extension options. For more details read [documentation](http://www.ericmmartin.com/projects/simplemodal/)
    'options'=>array(
        'close'=>true,
    ),
));

Another variant to use with beginWidget() и endWidget() methods

$this->beginWidget('ext.yiiext.widgets.simplemodal.ESimpleModalWidget', array(
    'selector'=>'#open_modal_link',
    'options'=>array(
        'close'=>true,
    ),
));
<div class="mywindow">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</div>
$this->endWidget();

Changelog

1.3

  • Update js to version 1.4.1. (Veaceslav Medvedev)
  • Added e.preventDefault() to prevent screen scrolling (Sam Dark)

1.2

Warning: this version is not backwards compatible to 1.1.

  • You can use beginWidget() end endWidget() to write a dialog content. (Veaceslav Medvedev)
  • $triggerElementSelector var changed in shortly $selector. (Veaceslav Medvedev)
  • Update js to version 1.3.5. (Veaceslav Medvedev)

1.1

  • Initial public release.

Wrapper around SimpleModal jQuery plugin.

Documentation

Downloads (Tags)

Resources