Я использую следующий код для создания панелей с вкладками, и только он хорошо справляется со своей задачей. Я попробовал easytabs, но он не работает должным образом с тем, что у меня есть. Итак, поехали:
/*
* The following lines are for main tabbed panels
*/
$(function() {
$('.nav a').click(function() {
// save $(this) in a variable for efficiency
var $this = $(this);
// hide panels
$('.panel').hide();
$('.nav a.active').removeClass('active');
// add active state to new tab
$this.addClass('active').blur();
// retrieve href from link (is id of panel to display)
var panel = $this.attr('href');
// show panel
$(panel).fadeIn(250);
// don't follow link down page
return (false);
});
// end click
// open first tab
$('.nav li:first a').click();
});
// end function
Я нашел плагин под названием BBQ, который использует Hashchange. http://benalman.com/projects/jquery-bbq-plugin/ Я схожу с ума, чтобы понять, как использовать это с моим кодом, чтобы иметь возможность использовать кнопку «Назад» в браузере. Пожалуйста помогите. Заранее спасибо за помощь. С уважением, Девиад.