1/** 2 * Title: Core JS 3 * 4 * Description: Defined all custom JS for core. 5 * 6 * Please do not edit this file. This file is part of the Cyber Chimps Framework and all modifications 7 * should be made in a child theme. 8 * 9 * @category Cyber Chimps Framework 10 * @package Framework 11 * @since 1.0 12 * @author CyberChimps 13 * @license http://www.opensource.org/licenses/gpl-license.php GPL v3.0 (or later) 14 * @link http://www.cyberchimps.com/ 15 */ 16 17jQuery(document).ready(function () { 18 19 // On click on HTML. 20 jQuery('html').click(function () { 21 22 // Check if mobile menu is open. 23 if (jQuery('.nav-collapse').hasClass('in')) { 24 25 // Close mobile menu. 26 jQuery('.nav-collapse').collapse('toggle'); 27 } 28 }); 29 30 // Stop propagation on click on search in the menu bar. 31 jQuery('#navigation .search-query').click(function(event){ 32 event.stopPropagation(); 33 }); 34});