Smoke.js is an intuitive, sleek and simple framework for creating dialog messages of different types including alert, confirm and quiz.

The following video clip goes through the very first steps you need to complete in order to use this library.

The code shown in this video clip is available below. Make sure you fix the relative links to the files that belong to the Smoke.js library.

<!DOCTYPE html>
<html>
<head>
    <title>Smoke.js Jump Start</title>
	<script type="text/javascript" src="smoke.js"></script>
    <link href="smoke.css" rel="stylesheet" media="screen" />
</head>
<body>
	<h1>Smoke.js Demo</h1>
	<script src="http://code.jquery.com/jquery.js"></script>
	<script>
	function show_quiz_question()
	{
		smoke.quiz("Which is your favorite color?", function(msg){
			console.log(msg);
		}, {
				button_1: "Red",
				button_2: "Green",
				button_3: "Blue",
				button_4: "Yellow",
				button_cancel: "None"
		});
	}
	</script>
	<input type="button" value="quiz" onclick="show_quiz_question()" />
</body>
</html>

You can find more slides and video clips for learning how to use the Smoke.js library in my new Smoke.js Basics free course at http://abelski.lifemichael.com.

Leave a Reply

Your email address will not be published. Required fields are marked *