Guest User

Untitled

a guest
Nov 14th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. function tablecell(){
  2. var st = $(this).attr('id');
  3. $('.answer').click(answer);
  4. console.log(st);
  5. if($(this).is('.disabled')){
  6. }
  7. else{
  8. $('.questionBg').css({'display':'flex'});
  9. function answer(){
  10. if ($(this).is('#true')){
  11. $(this).css({'background':'#83c849'}).css({'color':'#fff'});
  12. $('.answer').addClass('disabled');
  13. $('.disabled').off('click', answer);
  14. $('.teamSelection').css({'display':'flex'});
  15. $('.selectTeam').click(function(){
  16. $(close);
  17. alert(st);
  18. $("#"+st).addClass('disabled');
  19. if($(this).is('.selectTeam1')){
  20. $("#"+st).children('.question').css({'display':'none'});
  21. $("#"+st).children('.team1').css({'display':'block'});
  22. }
  23. else{
  24. $("#"+st).children('.question').css({'display':'none'});
  25. $("#"+st).children('.team2').css({'display':'block'});
  26. }
  27. });
  28. }
  29. else{
  30. $(this).css({'background':'#e03a3a'}).css({'color':'#fff'});
  31. $('.answer').addClass('disabled');
  32. $('.disabled').off('click', answer);
  33. setTimeout(close, 1000);
  34. }
  35. }
  36. }
  37. $('.answer').click(answer);
  38. };
  39.  
  40. $(document).ready(function(){
  41. $('.tablecell').click(tablecell);
  42. });
Add Comment
Please, Sign In to add comment