Commit 4b612bd5 by Valera Rozuvan

Adding callback to conditional constructor. Done.

parent 43ee09ef
...@@ -130,12 +130,17 @@ PollMain.prototype = { ...@@ -130,12 +130,17 @@ PollMain.prototype = {
_this.showAnswerGraph(response.poll_answers, response.total); _this.showAnswerGraph(response.poll_answers, response.total);
if (_this.verticalSectionEl !== null) { if (_this.verticalSectionEl !== null) {
_this.verticalSectionEl.find('xmodule_ConditionalModule', function (index, value) { console.log('Looking for conditional modules');
$(_this.verticalSectionEl).find('.xmodule_ConditionalModule').each(function (index, value) {
console.log('Found conditional element. index = '); console.log('Found conditional element. index = ');
console.log(index); console.log(index);
console.log('value = '); console.log('value = ');
console.log(value); console.log(value);
(new window.Conditional(value));
}); });
} else {
console.log('Did not find any conditional modules');
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment