PageSourceSearch

https://podravske-sesvete.hr/templates/shaper_doctor/js/main.js

js podravske-sesvete.hr collected 2026-10-02 23:12:11 UTC 6,185 bytes, 177 lines download raw bytes

1/**
2* @package Helix3 Framework
3* @author JoomShaper http://www.joomshaper.com
4* @copyright Copyright (c) 2010 - 2016 JoomShaper
5* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
6*/
7jQuery(function($) {
8
9    $('#offcanvas-toggler').on('click', function(event){
10        event.preventDefault();
11        $('body').addClass('offcanvas');
12    });
13
14    $( '<div class="offcanvas-overlay"></div>' ).insertBefore( '.body-innerwrapper > .offcanvas-menu' );
15
16    $('.close-offcanvas, .offcanvas-overlay').on('click', function(event){
17        event.preventDefault();
18        $('body').removeClass('offcanvas');
19    });
20
21    //Mega Menu
22    $('.sp-megamenu-wrapper').parent().parent().css('position','static').parent().css('position', 'relative');
23    $('.sp-menu-full').each(function(){
24        $(this).parent().addClass('menu-justify');
25    });
26
27    //Sticky Menu
28    $(document).ready(function(){
29        $("body.sticky-header").find('#sp-header').sticky({topSpacing:0})
30    });
31
32    // Select
33    if($(".sp-select").length > 0){
34        $(document).on('click', function(e) {
35            var selector = $('.sp-select');
36            if (!selector.is(e.target) && selector.has(e.target).length === 0) {
37                selector.find('ul').slideUp();
38            }
39        });
40
41        $('select').each(function(event) {
42            $(this).hide();
43            var $self = $(this);
44            var spselect  = '<div class="sp-select">';
45            spselect += '<div class="sp-select-result">';
46            spselect += '<span class="sp-select-text">' + $self.find('option:selected').text() + '</span>';
47            spselect += ' <i class="fa fa-sort-down"></i>';
48            spselect += '</div>';
49            spselect += '<ul class="sp-select-dropdown">';
50
51            $self.children().each(function(event) {
52                if($self.val() == $(this).val()) {
53                    spselect += '<li class="active" data-val="'+ $(this).val() +'">' + $(this).text() + '</li>';
54                } else {
55                    spselect += '<li data-val="'+ $(this).val() +'">' + $(this).text() + '</li>';
56                }
57            });
58
59            spselect += '</ul>';
60            spselect += '</div>';
61            $(this).after($(spselect));
62        });
63
64        $(document).on('click', '.sp-select', function(event) {
65            $('.sp-select').not(this).find('ul').slideUp();
66            $(this).find('ul').slideToggle();
67        });
68
69        $(document).on('click', '.sp-select ul li', function(event) {
70            var $select = $(this).closest('.sp-select').prev('select');
71            $(this).parent().prev('.sp-select-result').find('span').html($(this).text());
72            $(this).parent().find('.active').removeClass('active');
73            $(this).addClass('active');
74            $select.val($(this).data('val'));
75            $select.change();
76        });
77    }
78    // End Select
79
80
81    jQuery(function($){
82      var date_input=$('input[name="date"]'); //our date input has the name "date"
83      var options={
84        format: 'mm/dd/yyyy',
85        todayHighlight: true,
86        autoclose: true,
87      };
88        date_input.datepicker(options);
89    });
90
91    //Ajax Appointment Form
92    jQuery(function($) {
93        $('.sppb-appointment-form').on('submit', function(event) {
94
95            var $this = $(this);
96            event.preventDefault();
97
98            var $self   = $(this);
99            var value   = $(this).serializeArray();
100            var request = {
101                'option' : 'com_sppagebuilder',
102                'task'   : 'ajax',
103                'addon'  : 'appointment_form',
104                'data'   : value
105            };
106
107            $.ajax({
108                type   : 'POST',
109                data   : request,
110                beforeSend: function(){
111                    $self.find('.fa').addClass('fa-spinner fa-spin');
112                },
113                success: function (response) {
114                    $self.find('.fa-spin').removeClass('fa-spinner fa-spin');
115                    $this.find('input[type=text], input[type=email], input[type=number], textarea, input[type=date]').val("");
116                    $self.next('.sppb-ajax-contact-status').html($.parseJSON(response).data).fadeIn().delay(5000).fadeOut(500);
117                }
118            });
119
120            return false;
121        });
122    });
123
124    //Tooltip
125    $('[data-toggle="tooltip"]').tooltip();
126
127    $(document).on('click', '.sp-rating .star', function(event) {
128        event.preventDefault();
129
130        var data = {
131            'action':'voting',
132            'user_rating' : $(this).data('number'),
133            'id' : $(this).closest('.post_rating').attr('id')
134        };
135
136        var request = {
137                'option' : 'com_ajax',
138                'plugin' : 'helix3',
139                'data'   : data,
140                'format' : 'json'
141            };
142
143        $.ajax({
144            type   : 'POST',
145            data   : request,
146            beforeSend: function(){
147                $('.post_rating .ajax-loader').show();
148            },
149            success: function (response) {
150                var data = $.parseJSON(response.data);
151
152                $('.post_rating .ajax-loader').hide();
153
154                if (data.status == 'invalid') {
155                    $('.post_rating .voting-result').text('You have already rated this entry!').fadeIn('fast');
156                }else if(data.status == 'false'){
157                    $('.post_rating .voting-result').text('Somethings wrong here, try again!').fadeIn('fast');
158                }else if(data.status == 'true'){
159                    var rate = data.action;
160                    $('.voting-symbol').find('.star').each(function(i) {
161                        if (i < rate) {
162                           $( ".star" ).eq( -(i+1) ).addClass('active');
163                        }
164                    });
165
166                    $('.post_rating .voting-result').text('Thank You!').fadeIn('fast');
167                }
168
169            },
170            error: function(){
171                $('.post_rating .ajax-loader').hide();
172                $('.post_rating .voting-result').text('Failed to rate, try again!').fadeIn('fast');
173            }
174        });
175    });
176
177});

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.