PageSourceSearch

https://krewedesfleurs.org/wp-content/themes/zeal/inc/js/custom.js?ver=1.0.8

js krewedesfleurs.org collected 2026-10-07 23:57:12 UTC 3,763 bytes, 140 lines download raw bytes

1jQuery(function($) {
2
3    var wow = new WOW({
4        offset: 100
5    });
6    wow.init();
7
8    $(function(){
9        
10        $('#primary-menu').slicknav({
11            prependTo: 'nav.main-nav'
12        });
13        
14    });
15    
16
17    $(window).load( function() {
18        
19        var left_height     = $( 'div.single-post-left' ).css( 'height' );
20        var right_height    = $( 'div.single-post-right' ).css( 'height' );
21        
22        if ( typeof left_height !== 'undefined' && typeof right_height !== 'undefined' ) {
23        
24            left_height = parseInt(left_height.slice(0, -2));
25            right_height = parseInt(right_height.slice(0, -2));
26
27            if ( left_height > right_height ) {
28                $( 'div.single-post-right' ).css( 'height', left_height + 'px' );
29            } else {
30                $( 'div.single-post-left' ).css( 'height', right_height + 'px' );
31            }
32            
33        }
34        
35    });
36
37});
38
39jQuery(document).ready( function ($) {
40    
41    // scroll to top trigger
42    $('.scroll-top').click(function () {
43        $("html, body").animate({scrollTop: 0}, 1000);
44        return false;
45    });
46    
47    $('.zeal-search, #zeal-search .fa.fa-close').click(function () {
48
49        $('#zeal-search').fadeToggle(500);
50        $('.search-field').focus();
51
52    });
53    
54    $(window).resize( function () {
55//        rebuild_featured_posts();
56    })
57    
58    if( $(window).width() < 768 ) {
59        rebuild_featured_posts();
60    }
61    
62    function rebuild_featured_posts() {
63        
64        $('.featured-homepage-post').each( function () {
65            
66            var item = $('.featured-post-content', $( this ) ).html();
67            item = '<div class="col-sm-6 featured-post-content">' + item + '</div>';
68           
69           $( '.featured-post-content', $( this ) ).remove();
70           
71           $(this).append( item );           
72        });
73        
74        
75    }
76    
77    $.stellar({
78        horizontalScrolling: false,
79        verticalOffset: 40
80    });
81    
82    // -----------
83    // Contact Form
84    $('#zeal-contact-form').submit( function (e) {
85       
86        e.preventDefault();
87        
88        $('.mail-sent,.mail-not-sent').hide();
89       
90        var form = $(this);
91        var name = $('.name', form ).val();
92        var email = $('.email', form ).val();
93        var message = $('.message', form ).val();
94        var url = form.attr('action');
95        
96        if( name.length < 2 ) {
97            alert( 'Please enter a name' );
98            return false;
99        }
100        
101        if( message.length < 2 ) {
102            alert( 'Please enter a message' );
103            return false;
104        }
105        
106        if( ! zealValidateEmail( email ) ) {
107            alert( 'Please enter a valid email address' );
108            return false;
109        }
110        
111        var data = {
112            
113            action : 'zeal_send_message',
114            name : name,
115            email : email,
116            message : message
117            
118        }
119        
120        $.post( url, data, function ( response ) {
121           console.log( response );
122            if( response == 1 ) {
123                $('.mail-sent').fadeIn(350);
124                form[0].reset();
125                
126            }else{
127                $('.mail-not-sent').fadeIn(350);
128            }
129            
130        });
131        
132        
133    });
134    
135    function zealValidateEmail(email) {
136        var re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
137        return re.test(email);
138    }
139    
140});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.