PageSourceSearch

https://www.mairie-douzens.fr/wp-content/themes/zalive/js/function.js?ver=7.1.2

js mairie-douzens.fr collected 2026-10-02 21:04:49 UTC 3,841 bytes, 103 lines download raw bytes

1(function($){
2  $(function(){
3    //object zAlive_i18n (contains all text string for translation) is defined in wp_localize_script(in functions.php )
4
5    // top nav
6    var menuItems = $('.menu-item-has-children'),
7        isMobile = $('body').hasClass('is-mobile');
8    if(isMobile){
9      $('.mobile-mark .mobile-item').on('click',function(){
10        $(this).toggleClass('active');
11      });
12      $('.mobile-mark .mobile-item-search').on('click',function(){
13        $('#searchbox').toggleClass('active');
14        if($(this).hasClass('active')){
15          $('#s').focus();
16          if($('.navbar .nav').hasClass('active')){
17            $('.mobile-mark .mobile-item-nav').trigger('click');
18          }
19        }
20      });
21      $('.mobile-mark .mobile-item-nav').on('click',function(){
22        $('.navbar .nav').toggleClass('active');
23        menuItems.removeClass('active');
24        if($(this).hasClass('active') && $('#searchbox').hasClass('active') ){
25          $('.mobile-mark .mobile-item-search').trigger('click');
26        }
27      });
28      menuItems.each(function(){
29        var _this = $(this); 
30            aTag = _this.children('a');
31        aTag.on('click',function(e){
32          if(!_this.hasClass('active')){
33            e.preventDefault();
34            _this.toggleClass('active');
35          }
36        });
37      });
38    }else{
39      menuItems.each(function(i){
40        var _this = $(this);
41        _this.hover(function(){
42          _this.toggleClass('active');
43        });
44      });
45    }
46    
47    //show site tagline(description) if it's hidden by option 
48    if( $('.tagline-hidden').length != 0 ){
49      $('#header .brand').hover(function(){
50        $('.tagline-hidden').animate({'top':'+=35'});
51      },function(){
52        $('.tagline-hidden').animate({'top':'-=35'});
53      });
54    }
55    
56    //slider
57    if($('#zSlider').length != 0){
58      $('#zSlider').carousel({interval: parseInt(zAlive_i18n.slider_pause_time) }).bind('slid',function(){
59        $('#zSlider .description li.active').removeClass('active');
60        $('#zSlider .description li:eq(' + $('#zSlider .carousel-inner .active').index('#zSlider .carousel-inner .item') + ')').addClass('active');
61      });
62      $('#zSlider .description li').click(function(){
63        $('#zSlider').carousel($(this).index('#zSlider .description li'));
64      });
65      $('#zSlider .description li').hover(
66        function(){$(this).addClass('over')},
67        function(){$(this).removeClass('over')}
68      );
69    }
70    
71    //set custom hot commented articles and random articles widget visible only on desktop 
72    $('#sidebar .widget_zalive_widget_mostcommentedandrandomarticles').addClass('visible-desktop');
73    
74    //set custom recent comments widget visible only on desktop 
75    $('.widget_zalive_widget_recentcomments img').addClass('visible-desktop');
76    
77    //gotop
78    if($.isFunction($.scrollUp)){
79      $.scrollUp({
80        scrollName: 'goTop', // Element ID
81        topDistance: '300', // Distance from top before showing element (px)
82        topSpeed: 300, // Speed back to top (ms)
83        animation: 'fade', // Fade, slide, none
84        animationInSpeed: 200, // Animation in speed (ms)
85        animationOutSpeed: 200, // Animation out speed (ms)
86        scrollText: zAlive_i18n.gotop, // Text for element
87        activeOverlay: false // Set CSS color to display scrollUp active point, e.g '#00FFFF'
88      });
89    }
90    
91    //beautify the form and submit button on respond form
92    $('#respond .form-submit').addClass('row-fluid').prepend('<div class="span2 divider"></div>');
93    $('#respond  #submit').addClass('btn pull-left');
94    
95    //submit comment by using Ctrl+Enter shortcut
96    $('#commentform').keypress(function(e){
97      if(e.ctrlKey && e.which == 13 || e.which == 10) {
98        $('#submit').click();
99      }
100    });
101    
102  });
103})(jQuery);

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.