@justscreamy/quizzerino

1.1.4 • Public • Published

Quizzerino

Are you making a website and need to make a little quiz for the readers? Boy I know the best for you!

You can use Quizzerino to create simple, quick and functioning quiz for your little website.

How to use this?

It is simple, all you need to do is:

  1. Add script tag with src at the end of your body
<script src="https://cdn.jsdelivr.net/npm/@justscreamy/quizzerino@latest"></script>
  1. Create your quiz under that!
<script>
	new Quizzerino(
		'idOfYourEmptyQuizElement',
		'idOfYourOwnSubmitButton',
		'idOfYourElementToShowResults',
		[
			{
				text: 'Question text',
				answers: [
					{ id: 'answerId', text: 'answerText' },
					{ id: 'anotherAnswerId', text: 'anotherAnswerText' },
				],
				correct: 'answerId', // <-- id of correct answer
			}, // <-- you can have multiple questions, just use the same format
		]
	).initialize()
</script>
  1. You are done!

CSS

You can also style the quiz, it uses css classes

Element Class
the whole question question
all of the answers answers
the answer answer

Readme

Keywords

none

Package Sidebar

Install

npm i @justscreamy/quizzerino

Weekly Downloads

1

Version

1.1.4

License

MIT

Unpacked Size

13.7 kB

Total Files

3

Last publish

Collaborators

  • justscreamy