Помогите с jquery

12
S
На сайте с 30.09.2016
Offline
469
#11

<script>

$(document).ready(function(){
var sizeDiv = $(".catText").height();
var sizeSpan = $(".catText span").height();
$('.catText span').on('click', function(){
var sizeHeight = $(this).parents(".catText").children('div').outerHeight(true);
var parent = $(this).parents(".catText");
if(!$(this).hasClass('hidetext')){
parent.animate({ height: sizeHeight+sizeSpan }, 200, function(){
$(this).children('span').text("Свернуть").attr("title", "Свернуть");
$(this).children('em').css("background", "none");
});
$(this).addClass('hidetext');
}else{
parent.animate({ height: sizeDiv }, 200, function(){
$(this).children('span').text("Развернуть описание").attr("title", "Развернуть");
$(this).children('em').css("background", "url(../images/content_bg.png) top repeat-x");
});
$(this).removeClass('hidetext');
}
}
);
});
</script>
Отпилю лишнее, прикручу нужное, выправлю кривое. Вытравлю вредителей.
Василич#
На сайте с 10.03.2009
Offline
111
#12

Sitealert, СПАСИБО ОГРОМНОЕ !!!

Большое человеческое спасибо !)

bmw-power.com.ua (https://bmw-power.com.ua)
12

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий