Coder Social home page Coder Social logo

lottery.js's People

Contributors

dependabot[bot] avatar nekotora avatar untsop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lottery.js's Issues

关于中奖人数设置的问题

中奖人数最大只能增加到10,而且只能通过+ -按钮来操作,这样的话如果设置人数比较大的时候操作很繁琐,应该可以输入那种

Want the ability of event dispatches

Want the ability of event dispatches at different states, so that implementer can, bind to those events and do the necessary.

For example once a person wins lottery, implementer wants to trigger an APi to update in DB, how to to do that?

I am ready to contribute. Let me know if I can.

lottery.js cannot do auto stop if setting.once is true

I tried your great software!
but lottery.js cannot do auto stop if setting.once is true.
I guess this bug happen "console.log('Lottery: dup, next.') execute once.

my config in index.html:

$.lottery({
el: '.lotterybox',
api: 'sample-data.json',
once: true,
subtitle: 'company',
timeout: 3
});

thanks.

bug:刷新页面以后抽奖已经抽完但是还是可以重复抽

我发现“startLottery”方法里判断抽奖机会是否用完是用的每次刷新页面已经抽的次数,这里应该用历史记录里已经抽过的次数,防止误操作关闭页面以后,抽奖次数就超过了限制。
`var startLottery = function () {
if(localStorage.getItem('lotteryHistory')) settings.winnerHistory = JSON.parse(localStorage.getItem('lotteryHistory'));

initSelector()
//检查当每用户只能获奖一次时,是否有足够剩余用户参加抽奖
if (settings.once && settings.data.length - arrayCount(settings.winnerHistory) < settings.number) {
  alert('No user left to participate in lottery.');
  return false;
}

...
}`

Why not add bgm or/and winning tone?

  • Chinese:当光圈移动的时候播放背景音,选中人的时候播放中奖音效

  • English(google translation) : Play the background sound when the aperture moves, and play the winning sound when the person is selected.
    @untsop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.