Actualizar 'js/main.js'
This commit is contained in:
parent
534c473a91
commit
1cdb1d5c3f
25
js/main.js
25
js/main.js
@ -52,28 +52,3 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
window.addEventListener("orientationChange", lazyload);
|
window.addEventListener("orientationChange", lazyload);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
(function($) { // Begin jQuery
|
|
||||||
$(function() { // DOM ready
|
|
||||||
// If a link has a dropdown, add sub menu toggle.
|
|
||||||
$('nav ul li a:not(:only-child)').click(function(e) {
|
|
||||||
$(this).siblings('.nav-dropdown').toggle();
|
|
||||||
// Close one dropdown when selecting another
|
|
||||||
$('.nav-dropdown').not($(this).siblings()).hide();
|
|
||||||
e.stopPropagation();
|
|
||||||
});
|
|
||||||
// Clicking away from dropdown will remove the dropdown class
|
|
||||||
$('html').click(function() {
|
|
||||||
$('.nav-dropdown').hide();
|
|
||||||
});
|
|
||||||
// Toggle open and close nav styles on click
|
|
||||||
$('#nav-toggle').click(function() {
|
|
||||||
$('nav ul').slideToggle();
|
|
||||||
});
|
|
||||||
// Hamburger to X toggle
|
|
||||||
$('#nav-toggle').on('click', function() {
|
|
||||||
this.classList.toggle('active');
|
|
||||||
});
|
|
||||||
}); // end DOM ready
|
|
||||||
})(jQuery); // end jQuery
|
|
||||||
|
Loading…
Reference in New Issue
Block a user