PageSourceSearch

https://lepassage-royan.fr/templates/shaper_helix3/js/main.js

js lepassage-royan.fr collected 2026-09-27 06:51:11 UTC 3,410 bytes, 110 lines download raw bytes

1/**
2* @package Helix3 Framework
3* @author JoomShaper http://www.joomshaper.com
4* @copyright Copyright (c) 2010 - 2015 JoomShaper
5* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
6*/
7jQuery(function($) {
8
9    var $body = $('body'),
10    $wrapper = $('.body-innerwrapper'),
11    $toggler = $('#offcanvas-toggler'),
12    $close = $('.close-offcanvas'),
13    $offCanvas = $('.offcanvas-menu');
14
15    $toggler.on('click', function(event){
16        event.preventDefault();
17        stopBubble (event);
18        setTimeout(offCanvasShow, 50);
19    });
20
21    $close.on('click', function(event){
22        event.preventDefault();
23        offCanvasClose();
24    });
25
26    var offCanvasShow = function(){
27        $body.addClass('offcanvas');
28        $wrapper.on('click',offCanvasClose);
29        $close.on('click',offCanvasClose);
30        $offCanvas.on('click',stopBubble);
31
32    };
33
34    var offCanvasClose = function(){
35        $body.removeClass('offcanvas');
36        $wrapper.off('click',offCanvasClose);
37        $close.off('click',offCanvasClose);
38        $offCanvas.off('click',stopBubble);
39    };
40
41    var stopBubble = function (e) {
42        e.stopPropagation();
43        return true;
44    };
45
46    //Mega Menu
47    $('.sp-megamenu-wrapper').parent().parent().css('position','static').parent().css('position', 'relative');
48    $('.sp-menu-full').each(function(){
49        $(this).parent().addClass('menu-justify');
50    });
51
52    //Sticky Menu
53    $(document).ready(function(){
54        $("body.sticky-header").find('#sp-header').sticky({topSpacing:0})
55    });
56
57    //Tooltip
58    $('[data-toggle="tooltip"]').tooltip();
59    
60    $(document).on('click', '.sp-rating .star', function(event) {
61        event.preventDefault();
62
63        var data = {
64            'action':'voting',
65            'user_rating' : $(this).data('number'),
66            'id' : $(this).closest('.post_rating').attr('id')
67        };
68
69        var request = {
70                'option' : 'com_ajax',
71                'plugin' : 'helix3',
72                'data'   : data,
73                'format' : 'json'
74            };
75
76        $.ajax({
77            type   : 'POST',
78            data   : request,
79            beforeSend: function(){
80                $('.post_rating .ajax-loader').show();
81            },
82            success: function (response) {
83                var data = $.parseJSON(response.data);
84
85                $('.post_rating .ajax-loader').hide();
86
87                if (data.status == 'invalid') {
88                    $('.post_rating .voting-result').text('You have already rated this entry!').fadeIn('fast');
89                }else if(data.status == 'false'){
90                    $('.post_rating .voting-result').text('Somethings wrong here, try again!').fadeIn('fast');
91                }else if(data.status == 'true'){
92                    var rate = data.action;
93                    $('.voting-symbol').find('.star').each(function(i) {
94                        if (i < rate) {
95                           $( ".star" ).eq( -(i+1) ).addClass('active');
96                        }
97                    });
98
99                    $('.post_rating .voting-result').text('Thank You!').fadeIn('fast');
100                }
101
102            },
103            error: function(){
104                $('.post_rating .ajax-loader').hide();
105                $('.post_rating .voting-result').text('Failed to rate, try again!').fadeIn('fast');
106            }
107        });
108    });
109
110});

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.