Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tablecell(){
- var st = $(this).attr('id');
- $('.answer').click(answer);
- console.log(st);
- if($(this).is('.disabled')){
- }
- else{
- $('.questionBg').css({'display':'flex'});
- function answer(){
- if ($(this).is('#true')){
- $(this).css({'background':'#83c849'}).css({'color':'#fff'});
- $('.answer').addClass('disabled');
- $('.disabled').off('click', answer);
- $('.teamSelection').css({'display':'flex'});
- $('.selectTeam').click(function(){
- $(close);
- alert(st);
- $("#"+st).addClass('disabled');
- if($(this).is('.selectTeam1')){
- $("#"+st).children('.question').css({'display':'none'});
- $("#"+st).children('.team1').css({'display':'block'});
- }
- else{
- $("#"+st).children('.question').css({'display':'none'});
- $("#"+st).children('.team2').css({'display':'block'});
- }
- });
- }
- else{
- $(this).css({'background':'#e03a3a'}).css({'color':'#fff'});
- $('.answer').addClass('disabled');
- $('.disabled').off('click', answer);
- setTimeout(close, 1000);
- }
- }
- }
- $('.answer').click(answer);
- };
- $(document).ready(function(){
- $('.tablecell').click(tablecell);
- });
Add Comment
Please, Sign In to add comment