Ilya_Ru,
встроил в плагин, использовать
Сообщение от Ilya_Ru
|
class="height"
|
нет необходимости, но лучшее решение это css, a не js.
(function($) {
function setEqualHeight(columns) {
var tallestcolumn = 0;
columns.each(function() {
currentHeight = $(this).css({
height: ""
}).height();
if (currentHeight > tallestcolumn) tallestcolumn = currentHeight
});
columns.height(tallestcolumn)
}
$.fn.tabulous = function(options) {
var settings = $.extend({
effect: "scale"
}, options);
return this.each(function() {
var parent = $(this),
ul = $(">ul", parent),
links = $(">li a", ul),
block = $("> div", parent),
divs = $("> div", block),
hide = "hide" + settings.effect,
show = "show" + settings.effect;
ul.append('<span class="tabulousclear"></span>');
divs.css({
"position": "absolute",
"top": "10px",
"left": 0,
"right": 0
}).addClass("make_transist");
block.addClass("transition");
links.each(function(indx, a) {
var a = $(a);
a.on("click", function(event) {
event.preventDefault();
links.not(a.addClass("tabulous_active")).removeClass("tabulous_active");
var div = divs.eq(indx);
divs.removeClass(show).not(div.addClass(show)).addClass(hide);
block.height(div.height())
})
}).eq(0).click();
setEqualHeight(links);
$(window).resize(function() {
block.height(divs.filter("." + show).height());
setEqualHeight(links)
})
})
}
})(jQuery);