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

(Created page with "$(document).ready(function() { $('#comingSoon').height($(window).height()); $('.button').on('click', function() { $('.content').toggleClass('isOpen'); }); });")
 
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
<html>
 +
<script>
 
$(document).ready(function() {
 
$(document).ready(function() {
$('#comingSoon').height($(window).height());
+
$('.tab-container').on("click", function() {
$('.button').on('click', function() {
+
$(this).toggleClass('tab-show');
$('.content').toggleClass('isOpen');
+
$(this).toggleClass('tab-hide');
 +
 
 +
var arrow = $(this).find('.tab-container__arrow')[0];
 +
$(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');
 +
 +
var arrow = $(this).find('.nav-container__arrow')[0];
 +
$(arrow).toggleClass('flip-vertical');
 +
});
 +
 +
$('.minimal-dropdown__arrow').on("click", function() {
 +
$(this).toggleClass('fa-flipped-arrow');
 +
$(this).parent().parent().find('.minimal-dropdown__content').toggleClass('hidden');
 +
});
 +
 
});
 
});
 +
 +
 +
</script>
 +
</html>

Latest revision as of 00:46, 18 September 2015