PageSourceSearch

https://sanignacio.gob.mx/templates/shaper_newskit/js/main.js

js sanignacio.gob.mx collected 2026-10-03 01:04:05 UTC 9,167 bytes, 263 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 */
7
8jQuery(function ($) {
9
10    // ************    START Helix 1.4 JS    ************** //
11    // **************************************************** //
12
13    //Default
14    if (typeof sp_offanimation === 'undefined' || sp_offanimation === '') {
15        sp_offanimation = 'default';
16    }
17
18    if (sp_offanimation == 'default') {
19        $('#offcanvas-toggler').on('click', function (event) {
20            event.preventDefault();
21            $('.off-canvas-menu-init').addClass('offcanvas');
22        });
23
24        $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu');
25        $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) {
26            event.preventDefault();
27            $('.off-canvas-menu-init').removeClass('offcanvas');
28        });
29    }
30
31    // Slide Top Menu
32    if (sp_offanimation == 'slidetop') {
33        $('#offcanvas-toggler').on('click', function (event) {
34            event.preventDefault();
35            $('.off-canvas-menu-init').addClass('slide-top-menu');
36        });
37
38        $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu');
39        $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) {
40            event.preventDefault();
41            $('.off-canvas-menu-init').removeClass('slide-top-menu');
42        });
43    }
44
45    //Full Screen
46    if (sp_offanimation == 'fullscreen') {
47        $('#offcanvas-toggler').on('click', function (event) {
48            event.preventDefault();
49            $('.off-canvas-menu-init').addClass('full-screen-off-canvas');
50        });
51        $(document).ready(function () {
52            $('.off-canvas-menu-init').addClass('full-screen');
53        });
54        $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) {
55            event.preventDefault();
56            $('.off-canvas-menu-init').removeClass('full-screen-off-canvas');
57        });
58    }
59
60    //Full screen from top
61    if (sp_offanimation == 'fullScreen-top') {
62        $('#offcanvas-toggler').on('click', function (event) {
63            event.preventDefault();
64            $('.off-canvas-menu-init').addClass('full-screen-off-canvas-ftop');
65        });
66        $(document).ready(function () {
67            $('.off-canvas-menu-init').addClass('full-screen-ftop');
68        });
69        $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) {
70            event.preventDefault();
71            $('.off-canvas-menu-init').removeClass('full-screen-off-canvas-ftop');
72        });
73    }
74
75    //Dark with plus
76    if (sp_offanimation == 'drarkplus') {
77        $('#offcanvas-toggler').on('click', function (event) {
78            event.preventDefault();
79            $('.off-canvas-menu-init').addClass('new-look-off-canvas');
80        });
81        $('<div class="offcanvas-overlay"></div>').insertBefore('.offcanvas-menu');
82        $(document).ready(function () {
83            $('.off-canvas-menu-init').addClass('new-look');
84        });
85        $('.close-offcanvas,.offcanvas-overlay').on('click', function (event) {
86            event.preventDefault();
87            $('.off-canvas-menu-init').removeClass('new-look-off-canvas');
88        });
89    }
90
91    // if sticky header
92    if ($("body.sticky-header").length > 0) {
93        var fixedSection = $('#sp-header');
94        // sticky nav
95        var headerHeight = fixedSection.outerHeight();
96        var stickyNavTop = fixedSection.offset().top;
97        fixedSection.addClass('animated');
98        fixedSection.before('<div class="nav-placeholder"></div>');
99        $('.nav-placeholder').height('inherit');
100        //add class
101        fixedSection.addClass('menu-fixed-out');
102        var stickyNav = function () {
103            var scrollTop = $(window).scrollTop();
104            if (scrollTop > stickyNavTop) {
105                fixedSection.removeClass('menu-fixed-out').addClass('menu-fixed');
106                $('.nav-placeholder').height(headerHeight);
107            } else {
108                if (fixedSection.hasClass('menu-fixed')) {
109                    fixedSection.removeClass('menu-fixed').addClass('menu-fixed-out');
110                    $('.nav-placeholder').height('inherit');
111                }
112            }
113        };
114        stickyNav();
115        $(window).scroll(function () {
116            stickyNav();
117        });
118    }
119    // go to top
120    if (typeof sp_gotop === 'undefined') {
121        sp_gotop = '';
122    }
123
124    if (sp_gotop) {
125        // go to top
126        $(window).scroll(function () {
127            if ($(this).scrollTop() > 100) {
128                $('.scrollup').fadeIn();
129            } else {
130                $('.scrollup').fadeOut(400);
131            }
132        });
133
134        $('.scrollup').click(function () {
135            $("html, body").animate({
136                scrollTop: 0
137            }, 600);
138            return false;
139        });
140    } // has go to top
141
142    // Preloader
143    if (typeof sp_preloader === 'undefined') {
144        sp_preloader = '';
145    }
146
147    if (sp_preloader) {
148        $(window).on('load', function () {
149            if ($('.sp-loader-with-logo').length > 0) {
150                move();
151            }
152            setTimeout(function () {
153                $('.sp-pre-loader').fadeOut();
154            }, 1000);
155        });
156    } // has preloader
157    //preloader Function
158    function move() {
159        var elem = document.getElementById("line-load");
160        var width = 1;
161        var id = setInterval(frame, 10);
162        function frame() {
163            if (width >= 100) {
164                clearInterval(id);
165            } else {
166                width++;
167                elem.style.width = width + '%';
168            }
169        }
170    }
171    // ************    END:: Helix 1.4 JS    ************** //
172    // **************************************************** //
173
174    // **************   START Mega SCRIPT   *************** //
175    // **************************************************** //
176
177    //mega menu
178    $('.sp-megamenu-wrapper').parent().parent().css('position', 'static').parent().css('position', 'relative');
179    $('.sp-menu-full').each(function () {
180        $(this).parent().addClass('menu-justify');
181    });
182
183    // boxlayout
184    if ($("body.layout-boxed").length > 0) {
185        var windowWidth = $('#sp-header').parent().outerWidth();
186        $("#sp-header").css({"max-width": windowWidth, "left": "auto"});
187    }
188
189    // **************   END:: Mega SCRIPT   *************** //
190    // **************************************************** //
191
192    // **************  START Others SCRIPT  *************** //
193    // **************************************************** //
194
195    //Tooltip
196    $('[data-toggle="tooltip"]').tooltip();
197
198    // Article Ajax voting
199    $(document).on('click', '.sp-rating .star', function (event) {
200        event.preventDefault();
201
202        var data = {
203            'action': 'voting',
204            'user_rating': $(this).data('number'),
205            'id': $(this).closest('.post_rating').attr('id')
206        };
207
208        var request = {
209            'option': 'com_ajax',
210            'plugin': 'helix3',
211            'data': data,
212            'format': 'json'
213        };
214
215        $.ajax({
216            type: 'POST',
217            data: request,
218            beforeSend: function () {
219                $('.post_rating .ajax-loader').show();
220            },
221            success: function (response) {
222                var data = $.parseJSON(response.data);
223
224                $('.post_rating .ajax-loader').hide();
225
226                if (data.status == 'invalid') {
227                    $('.post_rating .voting-result').text('You have already rated this entry!').fadeIn('fast');
228                } else if (data.status == 'false') {
229                    $('.post_rating .voting-result').text('Somethings wrong here, try again!').fadeIn('fast');
230                } else if (data.status == 'true') {
231                    var rate = data.action;
232                    $('.voting-symbol').find('.star').each(function (i) {
233                        if (i < rate) {
234                            $(".star").eq(-(i + 1)).addClass('active');
235                        }
236                    });
237
238                    $('.post_rating .voting-result').text('Thank You!').fadeIn('fast');
239                }
240
241            },
242            error: function () {
243                $('.post_rating .ajax-loader').hide();
244                $('.post_rating .voting-result').text('Failed to rate, try again!').fadeIn('fast');
245            }
246        });
247    });
248
249    // **************  END:: Others SCRIPT  *************** //
250    // **************************************************** //
251
252    // **************  START Newskit SCRIPT  *************** //
253    // **************************************************** //
254    // Top Search
255    $('.icon-top-wrapper').on('click', function () {
256        $(this).toggleClass('active');
257        $('.search-container').fadeToggle();
258    });
259    
260    // **************   END:: Newskit SCRIPT   *************** //
261    // **************************************************** //
262
263});

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.