marshung / js-lib
Javascript extension library
Installs: 29
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Language:JavaScript
Type:js-lib
Requires
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();