jQuery:
Код: Выделить всё
$('.content-drawer').hide();
$('#tab1').show();
$('#calc').show();
$('.tab').click(function() {
var $this = $(this);
var target = $(this.rel);
$this.closest('li').addClass('active focus');
// Add the classes to the closest li of the clicked anchor
$('.tab').not($this).closest('li').removeClass('active focus');
// Remove the classes for the non-clicked items
$('.content-drawer').not(target).fadeOut();
// Slideup the other contents
target.delay(400).fadeToggle();
// Toggle the css3-mediaqueriesrrent content
if (target.is(':visible')) {
// Only if the target is visible remove the active class
$this.closest('li').removeClass('active');
}
return false;
});
Код: Выделить всё
[img]css/img/books.png[/img]
[url=#]Learn More[/url]
Что мне нужно:
чтобы открытый элемент div не закрывался при нажатии
Подробнее здесь: https://stackoverflow.com/questions/164 ... ready-open
Мобильная версия