execut/yii2-loading-overlay

Yii2 loading overlay widget

Maintainers

👁 execut

Package info

github.com/execut/yii2-loading-overlay

Wiki

Language:JavaScript

Type:yii2-extension

pkg:composer/execut/yii2-loading-overlay

Statistics

Installs: 2 959

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 0

0.3.4 2021-02-17 08:12 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Apache-2.0 3c93782ba8250a5057e2fab0dbb9c046204b2c2f

  • eXeCUT

yii2 widgetyii2 loading overlay

This package is auto-updated.

Last update: 2026-06-17 19:28:08 UTC


README

Yii2 loading overlay javascript widget

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require execut/yii2-loading-overlay "dev-master"

or add

"execut/yii2-loading-overlay": "dev-master"

to the require section of your composer.json file.

Usage

For usage javascript widget inside you javascript code simple register \execut\loadingOverlay\LoadingOverlayAsset on you page.

Example

Copy this code to app view file:

<button class="toggle-loading">Toggle overlay</button>
<div id="target" style="height:300px;width:300px;background:gray"></div>
<?php
$this->registerJs(<<<JS
jQuery(function ($) {
 var target = $('#target');
 $('.toggle-loading').click(function () {
 if (target.hasClass('loading')) {
 target.loadingOverlay('remove');
 } else {
 target.loadingOverlay();
 };
 });
});
JS
);
\execut\loadingOverlay\LoadingOverlayAsset::register($this);

License

yii2-loading-overlay is released under the Apache License Version 2.0. See the bundled LICENSE.md for details.