marshung / js-lib
Javascript extension library
Package info
Language:JavaScript
Type:js-lib
pkg:composer/marshung/js-lib
0.2.2
2019-03-16 16:36 UTC
Requires
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Mars's Javascript Library Packages
Outline
Installation
Composer Install
Download and Copy
Manually download the specified js library and copy it into the path
General installation
$ composer require marshung/js-lib
Custom path installation
- Edit the local composer.json, and add following code:
{
"require": {
"oomphinc/composer-installers-extender": "^1.1",
},
"extra": {
"installer-types": ["js-lib"],
"installer-paths": {
"path/{$vendor}/{$name}/": ["type:js-lib"]
}
}
}
- Run composer install
$ composer require marshung/js-lib
- See: composer-installers-extender
- Available variable:{$vendor}, {$name}, {$type}
- Judgment method:
- By name ["marshung/js-lib"]
- By type ["type:js-lib"]
Dependency
Popover Button
- jquery-1.12
- bootstrap 3.3
Usage
Popover Button init
HTML Code
<script src="src/popoverButton.js"></script>
Javascript Code
var options = { title : '是否刪除?', schema : [ { value : 'yes', text : '是', style : 'btn-primary' }, { value : 'no', text : '否', style : 'btn-danger' }, { value : 'note', text : '說明', style : 'btn-default' } ], callback : function(value, data, parameter) { console.log(value, data) } }; $app = app.Popover Button($('.selector'), options);
Popover Button destroy
Javascript Code
$app.destroy();