Line 1: | Line 1: | ||
{{Cadets2Vets}} | {{Cadets2Vets}} | ||
<html> | <html> | ||
+ | |||
+ | // BEGIN: Layout Mega Menu | ||
+ | var LayoutQuickSearch = function() { | ||
+ | |||
+ | return { | ||
+ | //main function to initiate the module | ||
+ | init: function() { | ||
+ | // desktop mode | ||
+ | $('.c-layout-header').on('click', '.c-mega-menu .c-search-toggler', function(e) { | ||
+ | e.preventDefault(); | ||
+ | |||
+ | $('body').addClass('c-layout-quick-search-shown'); | ||
+ | |||
+ | if (App.isIE() === false) { | ||
+ | $('.c-quick-search > .form-control').focus(); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | // mobile mode | ||
+ | $('.c-layout-header').on('click', '.c-brand .c-search-toggler', function(e) { | ||
+ | e.preventDefault(); | ||
+ | |||
+ | $('body').addClass('c-layout-quick-search-shown'); | ||
+ | |||
+ | if (App.isIE() === false) { | ||
+ | $('.c-quick-search > .form-control').focus(); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | // handle close icon for mobile and desktop | ||
+ | $('.c-quick-search').on('click', '> span', function(e) { | ||
+ | e.preventDefault(); | ||
+ | $('body').removeClass('c-layout-quick-search-shown'); | ||
+ | }); | ||
+ | } | ||
+ | }; | ||
+ | }(); | ||
+ | // END | ||
+ | |||
+ | |||
<section id="topintegrated"> | <section id="topintegrated"> | ||
<div class="topintegrated-overlay"> | <div class="topintegrated-overlay"> |
Revision as of 17:19, 9 June 2017