В настоящее время. многие сайты используют такой вид таб меню, особенно на WordPress, для экономии места на сайте. Я видел много сайтов использующих данный переключатель для того, чтобы на сайте было больше места , вставляя туда, например: меню, последние комментарии, случайные статьи и тд. Это хороший способ экономии пространства сайта, если использовать его правильно, то можно значительно увеличить рабочую область сайта.
//Get all the LI from the #tabMenu UL $('#tabMenu li').click(function(){
//perform the actions when it's not selected if (!$(this).hasClass('selected')) {
//remove the selected class from all LI $('#tabMenu li').removeClass('selected');
//Reassign the LI $(this).addClass('selected');
//Hide all the DIV in .boxBody $('.boxBody div.parent').slideUp('1500');
//Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important. $('.boxBody div.parent:eq(' + $('#tabMenu > li').index(this) + ')').slideDown('1500');
} }).mouseover(function() {
//Add and remove class, Personally I dont think this is the right way to do it, //if you have better ideas to toggle it, please comment $(this).addClass('mouseover'); $(this).removeClass('mouseout');
}).mouseout(function() {
//Add and remove class $(this).addClass('mouseout'); $(this).removeClass('mouseover');
});
//Mouseover with animate Effect for Category menu list <img src="http://s51.ucoz.net/sm/1/smile.gif" border="0" align="absmiddle" alt="smile" /> $('.boxBody #category li').mouseover(function() {
//Change background color and animate the padding $(this).css('backgroundColor','#888'); $(this).children().animate({paddingLeft:"20px"}, {queue:false, duration:300}); }).mouseout(function() {
//Change background color and animate the padding $(this).css('backgroundColor',''); $(this).children().animate({paddingLeft:"0"}, {queue:false, duration:300}); });
//Mouseover effect for Posts, Comments, Famous Posts and Random Posts menu list. $('.boxBody li').click(function(){ window.location = $(this).find("a").attr("href"); }).mouseover(function() { $(this).css('backgroundColor','#888'); }).mouseout(function() { $(this).css('backgroundColor',''); });
});
</script>
Из прикрепленного архива заливаем все файлы в соответствующие папки js, images.
Добавлять комментарии могут только зарегистрированные пользователи. [ Регистрация | Вход ]
Игра Virt-Life
Уважаемые пользователи сайта Zadroti-Cs.uCoz.Ru Хотим сообщить, что наш сайт поддерживает проект игры Virt-Life и мы гордимся тем, что находимся в ней, потому что она гарантирует стабильную и удобную игру, а самое главное - безопасность вашего персонажа.