lazyload
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
7 changed files
with
17 additions
and
17 deletions
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -2,18 +2,13 @@ | ... | @@ -2,18 +2,13 @@ |
| 2 | // Search Filter | 2 | // Search Filter |
| 3 | 3 | ||
| 4 | import jquery from 'jquery'; | 4 | import jquery from 'jquery'; |
| 5 | import LazyLoad from "vanilla-lazyload"; | ||
| 5 | 6 | ||
| 6 | var Search = (function($) { | 7 | var Search = (function($) { |
| 7 | 8 | ||
| 8 | function init() { | 9 | function init() { |
| 9 | 10 | ||
| 10 | setTimeout(() => { | ||
| 11 | |||
| 12 | //$('.sf-label-radio:contains("All Categories")').parent('li').remove(); | ||
| 13 | //$('.sf-label-radio:contains("Uncategorized")').parent('li').remove(); | ||
| 14 | //$('.sf-label-radio:contains("News")').click(); | ||
| 15 | 11 | ||
| 16 | }, "100"); | ||
| 17 | 12 | ||
| 18 | $('.search-box').css('margin-right', $('#main-nav .container').css('margin-right')); | 13 | $('.search-box').css('margin-right', $('#main-nav .container').css('margin-right')); |
| 19 | $('.search-box').css('opacity', '1'); | 14 | $('.search-box').css('opacity', '1'); |
| ... | @@ -60,16 +55,7 @@ var Search = (function($) { | ... | @@ -60,16 +55,7 @@ var Search = (function($) { |
| 60 | return false; | 55 | return false; |
| 61 | }); | 56 | }); |
| 62 | 57 | ||
| 63 | $(document).on("change",' #top-news-select input[type="radio"][name="_sft_category[]"]', function(e){ | 58 | |
| 64 | if (this.value == 'news') { | ||
| 65 | $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); | ||
| 66 | $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); | ||
| 67 | } | ||
| 68 | else if (this.value == 'events') { | ||
| 69 | $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); | ||
| 70 | $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); | ||
| 71 | } | ||
| 72 | }); | ||
| 73 | 59 | ||
| 74 | 60 | ||
| 75 | $(document).on("keydown", "#top-search", function(e){ | 61 | $(document).on("keydown", "#top-search", function(e){ | ... | ... |
| ... | @@ -116,6 +116,20 @@ jQuery(document).ready(function($) { | ... | @@ -116,6 +116,20 @@ jQuery(document).ready(function($) { |
| 116 | }); | 116 | }); |
| 117 | 117 | ||
| 118 | 118 | ||
| 119 | $(document).on("change",' #top-news-select input[type="radio"][name="_sft_category[]"]', function(e){ | ||
| 120 | if (this.value == 'news') { | ||
| 121 | $('form input[type="radio"][name="_sft_category[]"][value="news"]').attr('checked', 'checked').trigger('change'); | ||
| 122 | $('form input[type="radio"][name="_sft_category[]"][value="events"]').removeAttr('checked'); | ||
| 123 | myLazyLoad.update(); | ||
| 124 | } | ||
| 125 | else if (this.value == 'events') { | ||
| 126 | $('form input[type="radio"][name="_sft_category[]"][value="events"]').attr('checked', 'checked').trigger('change'); | ||
| 127 | $('form input[type="radio"][name="_sft_category[]"][value="news"]').removeAttr('checked'); | ||
| 128 | myLazyLoad.update(); | ||
| 129 | } | ||
| 130 | }); | ||
| 131 | |||
| 132 | |||
| 119 | 133 | ||
| 120 | document.addEventListener( 'wpcf7mailsent', function( event ) { | 134 | document.addEventListener( 'wpcf7mailsent', function( event ) { |
| 121 | jQuery('.appArea.responsive').hide(); | 135 | jQuery('.appArea.responsive').hide(); | ... | ... |
| ... | @@ -2,5 +2,5 @@ | ... | @@ -2,5 +2,5 @@ |
| 2 | Theme Name: MSF CA Child | 2 | Theme Name: MSF CA Child |
| 3 | Author: Tenzing Communications | 3 | Author: Tenzing Communications |
| 4 | Template: msf-ca | 4 | Template: msf-ca |
| 5 | Version: 1.0.525 | 5 | Version: 1.0.526 |
| 6 | */ | 6 | */ |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment