Difference between revisions of "Template:Northeastern Boston/Javascript"

Line 8: Line 8:
 
var arrow = $(this).find('.tab-container__arrow')[0];
 
var arrow = $(this).find('.tab-container__arrow')[0];
 
$(arrow).toggleClass('flip-vertical');
 
$(arrow).toggleClass('flip-vertical');
 +
});
 +
 +
$('.sub-nav__parent').on("click", function() {
 +
// Toggle active navbar
 +
//$('.active').toggleClass('active');
 +
 +
// Toggle active of current nav element
 +
//var link = $(this).children()[0];
 +
//$(link).toggleClass('active');
 +
 +
// Toggle hiding of children nav elements
 +
var sibling = $(this).siblings()[0];
 +
$(sibling).toggleClass('hidden');
 
});
 
});
  

Revision as of 20:50, 13 September 2015