I have an if statement that doesn’t seem to quite work and I’m not entirely sure why and was wondering if anyone saw something that I didn’t
$(".nav_btn, .bow_nav_btn").click(function () {
var jthis = this;
if ($(jthis).hasClass("bow_nav_btn")) {
$('.bow_nav_btn').removeClass('bow_nav_selected');
$('.bow_nav_btn').addClass('bow_nav_unselected');
$(this).removeClass('bow_nav_unselected');
$(this).addClass('bow_nav_selected');
} else if ($(jthis).hasClass("bow_unselect")) {
$("bow_nav").slideUp();
} else($(jthis).hasClass("bow_select")) {
$("bow_nav").slideDown();
}
});
You seem to have invalid selectors at the end too, along with the already mentioned
else ifissue.The whole code should probably be similar to: