Code (Javascript):
(function($) {
var $fortune = function(args) {
if (args === undefined) {
throw new Error("You must define the options.prices")
}
var options = $.extend({}, {
prices: args,
duration: 1e3,
separation: 2,
min_spins: 10,
max_spins: 15,
onSpinBounce: function() {}
}, args);
var fortune = this;
var prices_amount = Array.isArray(options.prices) ? options.prices.length : options.prices;
var prices_delta = 360 / prices_amount;
var is_spinning =...
var $fortune = function(args) {
if (args === undefined) {
throw new Error("You must define the options.prices")
}
var options = $.extend({}, {
prices: args,
duration: 1e3,
separation: 2,
min_spins: 10,
max_spins: 15,
onSpinBounce: function() {}
}, args);
var fortune = this;
var prices_amount = Array.isArray(options.prices) ? options.prices.length : options.prices;
var prices_delta = 360 / prices_amount;
var is_spinning =...
Kann mir wer helfen, den Code zu erklären
0 commentaires:
Enregistrer un commentaire