не могу соединить код
Здраствуйте, уважаемые! в js совсем не разбираюсь, прошу вашей помощи.
в этом коде выделается только название страниц в навигации: (function($) { $.fn.lavaLamp = function(o) { o = $.extend({ fx: "linear", speed: 500, click: function(){} }, o || {}); return this.each(function() { var me = $(this), noop = function(){}, $back = $('<li class="back"><div class="left"></div></li>').appendTo(me), $li = $("li", this), curr = $("li.current_page_item", this)[0] || $($li[0]).addClass("current_page_item")[0]; $li.not(".back").hover(function() { move(this); }, noop); $(this).hover(noop, function() { move(curr); }); $li.click(function(e) { setCurr(this); return o.click.apply(this, [e, this]); }); setCurr(curr); function setCurr(el) { $back.css({ "left": el.offsetLeft+"px", "width": el.offsetWidth+"px" }); curr = el; }; function move(el) { $back.each(function() { $(this).dequeue(); } ).animate({ width: el.offsetWidth, left: el.offsetLeft }, o.speed, o.fx); }; }); }; })(jQuery); а нужно чтобы еще и название рубрик current-cat подсвечивалось, т.е. соеденить: $li = $("li", this), curr = $("li.current_page_item", this)[0] || $($li[0]).addClass("current_page_item")[0]; и $li = $("li", this), curr = $("li.current-cat", this)[0] || $($li[0]).addClass("current-cat")[0]; что то у меня не получается.... жду подсказки)))) спасибо за внимание:) |
Часовой пояс GMT +3, время: 16:04. |