Attach events to Simon module; still waiting on arrows
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<input type="radio" name="simonStrikes" value="0" id="simonStrikes0" />
|
||||
<input type="radio" name="simonStrikes" value="0" id="simonStrikes0" checked />
|
||||
<label for="simonStrikes0">0 strikes</label>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -166,6 +166,22 @@ $('.jsResetSection').on('click', function () {
|
||||
});
|
||||
})();
|
||||
|
||||
(function () {
|
||||
/**
|
||||
* Simon
|
||||
*/
|
||||
var $checkbox = $('#simonVowel'),
|
||||
$strikeButtons = $('#sectionSimon input[name="simonStrikes"]');
|
||||
|
||||
$('#sectionSimon input').on('change', function () {
|
||||
var hasVowel = $checkbox.prop('checked'),
|
||||
strikes = $strikeButtons.filter(':checked').val();
|
||||
|
||||
// Do something with arrows and stuff!
|
||||
console.log({vowel: hasVowel, strikes: strikes});
|
||||
});
|
||||
})();
|
||||
|
||||
(function () {
|
||||
/**
|
||||
* Memory
|
||||
|
||||
Reference in New Issue
Block a user