Показать сообщение отдельно
  #6 (permalink)  
Старый 25.03.2014, 22:48
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,103

Hurray, ошибка у вас в 25 строке = вместо ()
ну и как вариант
<!DOCTYPE HTML>

<html>

<head>
  <title>Untitled</title>
  <meta charset="utf-8">
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  <style type="text/css">
  .hpop_item{
    background-color: #FFA500;
    height: 100px
  }

  </style>
</head>

<body>
<nav class="h_menu">
				<ul>
					<li class="h_menu-now">
						<div class="logo">
							<a href="/" title="Indian Ocean">
								<span>Indian<b>Ocean</b></span>
								<p>сайт туристической компании Dek Travel</p>
							</a>
						</div>
					</li>
					<li class="h_menu_i h_menu_i-1
"><a href="/seychelles/"><span>Сейшельские</span> острова</a></li>
					<li class="h_menu_i h_menu_i-2
"><a href="/mauritius/">остров <span>Маврикий</span></a></li>
					<li class="h_menu_i h_menu_i-3
"><a href="/maldives/">острова <span>Мальдивы</span></a></li>
					<li class="h_menu_i h_menu_i-4
"><a href="/сountrys/">другие <span>Страны</span></a></li>
				</ul>
			</nav>
<div style="height: 0px; overflow: hidden;" class="hpop list">
	<div style="display: none; opacity: 1;" class="hpop_item">
		Выпадающая вкладка 1
	</div>
	<div style="display: none; opacity: 1;" class="hpop_item">
		Выпадающая вкладка 2
	</div>
	<div style="display: none; opacity: 1;" class="hpop_item">
		Выпадающая вкладка 3
	</div>
	<div style="display: none; opacity: 1;" class="hpop_item">
		Выпадающая вкладка 4
	</div>
</div>
<script>var glt;
    var $menu = $(".h_menu .h_menu_i")
    $menu.mouseenter(function(){
        var num = $menu.index(this);
		glt = setTimeout(function() {
				var $item=$(".hpop_item").eq(num);
				var he=$item.height();
				$(".hpop_item").stop(true,true).fadeOut(100);
				$(".hpop").stop().css({height:0}).animate({height:he},300);
				$item.stop().fadeIn(300);
}, 500)
	});
// если убрать курсор с пункта меню, таймер уничтожается
  $(".h_menu .h_menu_i").mouseleave(  function() {
    $(".hpop_item").stop(true,true).fadeOut(100);
    clearTimeout(glt);
  })

</script>
</body>

</html>

Последний раз редактировалось рони, 25.03.2014 в 22:59.
Ответить с цитированием