[Web Master ]
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » Cкрипты для ucoz » Меню » Flash Menu
Flash Menu
Alex28jДата: Пятница, 26.02.2010, 06:10 | Сообщение # 1
Генералиссимус
Группа: Администраторы
Сообщений: 286
Награды: 11
Репутация: 108
Статус:
Code
<script src="http://soft-ucoz.ucoz.ru/scripts/jquery-1.2.6.js"></script><STYLE>
* {border: 0px none; }
a img.MenuImg {border: 0px none; }
</STYLE><DIV id="TheMenu"></DIV><script>
Icons = ['http://alex28j.net/icons/home.png', 'http://alex28j.net/icons/forum.png', 'http://alex28j.net/icons/guest.png', 'http://alex28j.net/icons/kontakt.png', 'http://alex28j.net/icons/rss.png',];
URLs = ['$HOME_PAGE_LINK$', '/forum', '/gb', '/index/0-3', '/forum/0-0-0-37'];
Orientation = 'h';
Heights = [128, 100, 80, 60];
Opacities = [1.0, 0.8, 0.4, 0.15];
MenuAlign = 'center';
VAlign = 'top';
HAlign = 'center';
Speed = 250;

MenuCode = '<table id="MenuTable" style="height: ' + (Heights[0] - - 10) + 'px; ">';
if (Orientation === 'h') {
  MenuCode += '<tr>';
  for (i = 0; i < Icons.length; i++) {
  MenuCode += '<td valign="' + VAlign + '"><a href="' + URLs[i] + '"><img style="height: ' + Heights[Heights.length - 1] + 'px; " src="' + Icons[i] + '" class="MenuImg"></a></td>';
  }
  MenuCode += '</tr>';
} else {
  for (i = 0; i < Icons.length; i++) {
  MenuCode += '<tr><td align="' + HAlign + '"><a href="' + URLs[i] + '"><img style="height: ' + Heights[Heights.length - 1] + 'px; " src="' + Icons[i] + '" class="MenuImg"></td></a></tr>';
  }
}
MenuCode += '</table>';
$('#TheMenu').html(MenuCode).attr('align', MenuAlign);

$('img.MenuImg').animate({height: Heights[Heights.length - 1] + "px", opacity: Opacities[Opacities.length - 1]}, 1).each(function (j) {
jQuery(this).hover(function () {
  $('img.MenuImg').stop();
  for (i = 0; i < $('img.MenuImg').length; i++) {
  jQuery('img.MenuImg:eq(' + i + ')').animate({height: (Math.abs(i - j) < Heights.length ? Heights[Math.abs(i - j)] + "px" : Heights[Heights.length - 1] + "px"), opacity: (Math.abs(i - j) < Opacities.length ? Opacities[Math.abs(i - j)] : Opacities[Opacities.length - 1])}, Speed);
  }
  }, function () {
  });
});

$('#MenuTable').hover(function () {

}, function () {
  $('img.MenuImg').stop().animate({height: Heights [Heights.length - 1] + "px", opacity: Opacities[Opacities.length - 1]}, Speed);
});
</script><DIV>
 
Форум » Cкрипты для ucoz » Меню » Flash Menu
  • Страница 1 из 1
  • 1
Поиск: