execut/yii2-loading-overlay
最新稳定版本:0.3.4
Composer 安装命令:
composer require execut/yii2-loading-overlay
包简介
Yii2 loading overlay widget
README 文档
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.
统计信息
- 总下载量: 2.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2019-05-05