jyoungblood / smoke.js

framework-agnostic styled alert system for javascript
http://smoke.js.org/
930 stars 107 forks source link

Limitation to 3 quiz buttons #64

Open Falseclock opened 7 years ago

Falseclock commented 7 years ago

Just simply replace button_1, button_2, button_3 with array:

        buttons: [
                        {value : '11', name: "Option 33"},
                        {value : '20', name: "Option 66"},
                        {value : '61', name: "Option 91"},
                        {value : '42', name: "Option 55"},
                        {value : '99', name: "Option 42"}
                    ]

callback handler returns reference to the button. value can be accessed by reading data-quiz-value property