-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evan buzzfeed quiz edits #30
Conversation
<!-- Magic things that make the quiz work behind the scenes! --> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to include this so when students copy our codepen the appropriate jQuery libraries are linked
'Q1': {'a':1,'b':2,'c':3,'d':4}, | ||
'Q2': {'a':2,'b':3,'c':4,'d':1}, | ||
'Q3': {'a':2,'b':4,'c':1,'d':3}, | ||
'Q4': {'a':3,'b':1,'c':2,'d':4}, | ||
'Q5': {'a':1,'b':2,'c':3,'d':4}, | ||
'Q6': {'a':1,'b':2,'c':3,'d':4} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opted to change the top level keys here to strings 1
=> Q1
It reduces some ambiguity and thus makes describing the different levels in our nested dictionary a little easier.
this.init = function(){ | ||
self._bindEvents(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this function and just placed the code directly in the init function
@@ -41,7 +41,7 @@ body { | |||
margin-right:10px; | |||
} | |||
|
|||
&.active { | |||
&.chosen { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor renaming, makes certain lines read more like English such as:
let chosenAnswer = $(question).find('.quiz-answer.chosen').data('quiz-answer')
Edited for typos
Awesome work! |
Bunch of changes in preparation for project walkthrough with the kids.
Main focuses
script.js
to make reading it less overwhelming for studentsMinor focuses