| 
		
			Сообщение от jsuse
			
		
	 | 
	
		Как в jQuery реализуются условия? 
Вот допустим есть код: 
1	button.onclick = function() { 
2	if (div.style.display == "none") { 
3	  div.style.display = "block"; 
4	else { 
5	  div.style.display = "none"; 
6	} 
 
 
Как такое условие реализовать с jQuery?
	 | 
	
можно так
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>demo</title>
  <script type='text/javascript' src='http://code.jquery.com/jquery-git.js'></script>
</head>
<body>
	<button>button</button>
	<div>div</div>
	<script>
		$('button').click(function () {
			$('div').toggle();                  
		});
	</script>
  
</body>
</html>