jquery-gift-combo
Gift combo in live.
Install
$ npm i jquery jquery-gift-combo
Usage
JavaScript
import $ from 'jquery'import 'jquery-gift-combo'let $giftCombo = $('#foo').giftCombo()let $button = $('#bar') $button.on('click', function () { const gifts = 0 | Math.random() * 2 + 1 // create random amounts of gift $giftCombo.send(gifts)})
HTML
Gift!
CSS
@ 50% 100% }
Options
{ // CSS hook activeClassName: 'active', // default: gift-combo-active // Life cycle startCombo: function () {}, oneGift: function () {}, oneCombo: function () {}, allCombo: function () {}}
API
send
Number
Default value: 1 The number of gifts which will be sent.
$foo.send(5)