first commit
This commit is contained in:
59
module/Qmodule/description.js
Normal file
59
module/Qmodule/description.js
Normal file
@@ -0,0 +1,59 @@
|
||||
window.kon = window.kon || {}
|
||||
|
||||
kon.description = (function () {
|
||||
var variable;
|
||||
|
||||
function setVariable(vars) { kon.description.variable = vars; }
|
||||
|
||||
function DM1() {
|
||||
var nextFunc = function() {
|
||||
return true;
|
||||
};
|
||||
return nextFunc
|
||||
}
|
||||
|
||||
function DM2(option) {
|
||||
var time = ""
|
||||
|
||||
if(option.time) {
|
||||
time = option.time
|
||||
} else {
|
||||
time = 3
|
||||
}
|
||||
$(".question-button-box button").css("display","none")
|
||||
|
||||
var count = createnode("div",time,{"id":"count","style":"font-weight:bold"});
|
||||
$(".question-button-box").append(count)
|
||||
var timer = setInterval(function() {
|
||||
time--;
|
||||
$("#count").remove();
|
||||
var count = createnode("div",time,{"id":"count","style":"font-weight:bold"});
|
||||
$(".question-button-box").append(count)
|
||||
if(time === 0) {
|
||||
$("#count").remove();
|
||||
$(".question-button-box button").fadeIn()
|
||||
clearInterval(timer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}, 1000);
|
||||
|
||||
|
||||
var nextFunc = function() {
|
||||
return true;
|
||||
};
|
||||
return nextFunc
|
||||
}
|
||||
|
||||
var module = {
|
||||
/* variable */
|
||||
variable:variable,
|
||||
/* function */
|
||||
setVariable:setVariable,
|
||||
DM1:DM1,
|
||||
DM2:DM2
|
||||
}
|
||||
|
||||
return module;
|
||||
})();
|
||||
Reference in New Issue
Block a user