Original post: Why doesn't this simple script work?
if ($('#navigation > ul > li > ul > li > a').hasClass('.active')) {
$(this).parent().parent().parent().addClass(".active");
}
EDIT:
This won't hide the H1:
if ($('#content h1').hasClass('aktiv')) {
$(this).hide();
}
Only this will:
if ($('#content h1').hasClass('aktiv')) {
$('#content h1').hide();
}
Why can't I use the (this)?