2017 © Pedro Peláez
 

yii2-extension yii2-backstretch-widget

Wrapper around the Backstretch JQuery plugin

image

raoul2000/yii2-backstretch-widget

Wrapper around the Backstretch JQuery plugin

  • Monday, June 22, 2015
  • by raoul2000
  • Repository
  • 3 Watchers
  • 3 Stars
  • 421 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Backstretch Yii2 Extension

This yii2 extension is a wrapper around the jQuery Backstretch Plugin., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist raoul2000/yii2-backstretch-widget "*"

or add, (*4)

"raoul2000/yii2-backstretch-widget": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code like for instance in the examples below., (*6)

Start a slideshow on the background of element #elementId., (*7)

Note that the images are defined as local or remote. The second argument of pluginOptions contains the plugin initialization settings that can be redefined if the default ones are not what you want., (*8)

    raoul2000\widget\backstretch\Backstretch::widget([
        'selector' => '#elementId',
        'pluginOptions' => [
            [
                'path/to/image1.jpg',
                'http://hostname1/path/to/image2.jpg',
                'http://hostname2/path/to/image3.jpg'
            ],
            [
                'duration' => 3000,
                'fade' => 'slow',
                'centeredX' => true,
                'centeredY' => true
            ]
        ]
    ]);

To attach Backstretch as the body's background, (*9)

In its simplest form, attach an image to the background of the body element. Default settings are used to initialize the plugin., (*10)

    raoul2000\widget\backstretch\Backstretch::widget([
        'pluginOptions' => 'path/to/image1.jpg'
    ]);

For complete documentation please refer to the jquery-backstretch Github page, (*11)

If this plugin did not convinced you, have a look to the Background Switcher Plugin, (*12)

License

yii2-backstretch-widget is released under the BSD 3-Clause License. See the bundled LICENSE.md for details., (*13)

The Versions

22/06 2015

dev-master

9999999-dev

Wrapper around the Backstretch JQuery plugin

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 image background slider

28/10 2014

1.0.1

1.0.1.0

Wrapper around the Backstretch JQuery plugin

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 image background slider

28/10 2014

1.0.0

1.0.0.0

Wrapper around the Backstretch JQuery plugin

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 image background slider