|
@@ -424,9 +424,18 @@ var rules={
|
|
|
onEnterPress:function () {
|
|
|
// body...
|
|
|
if(main.current.classList.contains("item")){
|
|
|
- var answerId=$(this.current).attr("data-id");
|
|
|
- $(this.current).addClass("cur_answer");
|
|
|
- answer(answerId);
|
|
|
+ var ischeck=false
|
|
|
+ for (var i = 0; i < this.hotbtn.length; i++) {
|
|
|
+ if(this.hotbtn[i].classList.contains("cur_answer")){
|
|
|
+ ischeck=true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(ischeck){
|
|
|
+ var answerId=this.current.getAttribute("data-id");
|
|
|
+ this.current.classList.add("cur_answer");
|
|
|
+ answer(answerId);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|