Это мой Javascript код:Javascript табличную функцию, как добавить активный класс активной кнопки
<script type="text/javascript">
var showcont = [];
var showcont_containers = [];
$('#tabs ul li a').each(function() {
// note that this only compares the pathname, not the entire url
// which actually may be required for a more terse solution.
if (this.pathname == window.location.pathname) {
showcont.push(this);
showcont_containers.push($(this.hash).get(0));
};
});
$(showcont).click(function(e){
$(showcont_containers).hide().filter(this.hash).fadeIn();
e.preventDefault();
});
</script>
Как добавить активный класс #tabs ul li a
? Пожалуйста, помогите мне
Это не тот javascript, который правильно помечает ваши вопросы. –
Это рабочий код .. –