MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / makeChoice

Function makeChoice

modules/tinder/tinder.js:119–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117 }
118
119 function makeChoice() {
120 var el = d3.select(this);
121 var cls = el.attr("class");
122
123 var feedback = "<div class='feedback'>I agree.</div>";
124 if (cls == "button like" && codeSamples[stepCount].correctAnswer == 0) {
125 feedback = "<div class='feedback'>I disagree.</div>"
126 } else if (cls == "button dislike" && codeSamples[stepCount].correctAnswer == 1) {
127 feedback = "<div class='feedback'>I disagree.</div>"
128 }
129
130 d3.selectAll(".selected").classed("selected", false);
131 paulTalk(feedback+codeSamples[stepCount].paulbot);
132 stepCount = stepCount + 1;
133 }
134
135 // click ok and continue
136 ok.on("click",function(){

Callers

nothing calls this directly

Calls 1

paulTalkFunction · 0.85

Tested by

no test coverage detected