Výsledkovka čísla (a zobrazování podúloh) onmouseover -> onclick
This commit is contained in:
		
							parent
							
								
									c9fa4607a7
								
							
						
					
					
						commit
						474ef989a9
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		|  | @ -52,14 +52,16 @@ | |||
| {# TODELETE #} | ||||
| <script> | ||||
|     {% for p in problemy %} | ||||
|         diplayed{{ forloop.counter }} = false; | ||||
|         $(".podproblem{{ forloop.counter }}").css("display", "none") | ||||
|         $("#problem{{ forloop.counter }}")[0].addEventListener('mouseover', podproblem{{ forloop.counter }}) | ||||
|         $("#problem{{ forloop.counter }}")[0].addEventListener('mouseout', podproblem{{ forloop.counter }}end) | ||||
|         $("#problem{{ forloop.counter }}")[0].addEventListener('click', podproblem{{ forloop.counter }}); | ||||
|         function podproblem{{ forloop.counter }}(event) { | ||||
|             $(".podproblem{{ forloop.counter }}").css("display", "") | ||||
|         } | ||||
|         function podproblem{{ forloop.counter }}end(event) { | ||||
|             $(".podproblem{{ forloop.counter }}").css("display", "none") | ||||
|             diplayed{{ forloop.counter }} = !diplayed{{ forloop.counter }}; | ||||
|             if (diplayed{{ forloop.counter }}) { | ||||
|                 $(".podproblem{{ forloop.counter }}").css("display", ""); | ||||
|             } else { | ||||
|                 $(".podproblem{{ forloop.counter }}").css("display", "none"); | ||||
|             } | ||||
|         } | ||||
|     {% endfor %} | ||||
| </script> | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue