PageSourceSearch

https://unicienciabga.edu.co/templates/shaper_educon/js/main.js

js unicienciabga.edu.co collected 2026-10-09 04:43:59 UTC 9,656 bytes, 275 lines download raw bytes

1/**
2 * @package Helix3 Framework
3 * @author JoomShaper http://www.joomshaper.com
4 * @copyright Copyright (c) 2010 - 2022 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
120
121    // go to top
122    if (typeof sp_gotop === 'undefined') {
123        sp_gotop = '';
124    }
125
126    if (sp_gotop) {
127        // go to top
128        $(window).scroll(function () {
129            if ($(this).scrollTop() > 100) {
130                $('.scrollup').fadeIn();
131            } else {
132                $('.scrollup').fadeOut(400);
133            }
134        });
135
136        $('.scrollup').click(function () {
137            $("html, body").animate({
138                scrollTop: 0
139            }, 600);
140            return false;
141        });
142    } // has go to top
143
144    // Preloader
145    if (typeof sp_preloader === 'undefined') {
146        sp_preloader = '';
147    }
148
149    if (sp_preloader) {
150        $(window).on('load', function () {
151            if ($('.sp-loader-with-logo').length > 0) {
152                move();
153            }
154            setTimeout(function () {
155                $('.sp-pre-loader').fadeOut();
156            }, 1000);
157        });
158    } // has preloader
159    //preloader Function
160    function move() {
161        var elem = document.getElementById("line-load");
162        var width = 1;
163        var id = setInterval(frame, 10);
164        function frame() {
165            if (width >= 100) {
166                clearInterval(id);
167            } else {
168                width++;
169                elem.style.width = width + '%';
170            }
171        }
172    }
173    // ************    END:: Helix 1.4 JS    ************** //
174    // **************************************************** //
175
176    // **************   START Mega SCRIPT   *************** //
177    // **************************************************** //
178
179    //mega menu
180    $('.sp-megamenu-wrapper').parent().parent().css('position', 'static').parent().css('position', 'relative');
181    $('.sp-menu-full').each(function () {
182        $(this).parent().addClass('menu-justify');
183    });
184
185    // boxlayout
186    if ($("body.layout-boxed").length > 0) {
187        var windowWidth = $('#sp-header').parent().outerWidth();
188        $("#sp-header").css({"max-width": windowWidth, "left": "auto"});
189    }
190
191    // **************   END:: Mega SCRIPT   *************** //
192    // **************************************************** //
193
194    // **************  START Others SCRIPT  *************** //
195    // **************************************************** //
196
197    //Tooltip
198	var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-toggle="tooltip"]'));
199	var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
200		return new bootstrap.Tooltip(tooltipTriggerEl);
201	});
202
203    // Article Ajax voting
204    $(document).on('click', '.sp-rating .star', function (event) {
205        event.preventDefault();
206
207        var data = {
208            'action': 'voting',
209            'user_rating': $(this).data('number'),
210            'id': $(this).closest('.post_rating').attr('id')
211        };
212
213        var request = {
214            'option': 'com_ajax',
215            'plugin': 'helix3',
216            'data': data,
217            'format': 'json'
218        };
219
220        $.ajax({
221            type: 'POST',
222            data: request,
223            beforeSend: function () {
224                $('.post_rating .ajax-loader').show();
225            },
226            success: function (response) {
227                var data = $.parseJSON(response.data);
228
229                $('.post_rating .ajax-loader').hide();
230
231                if (data.status == 'invalid') {
232                    $('.post_rating .voting-result').text('You have already rated this entry!').fadeIn('fast');
233                } else if (data.status == 'false') {
234                    $('.post_rating .voting-result').text('Somethings wrong here, try again!').fadeIn('fast');
235                } else if (data.status == 'true') {
236                    var rate = data.action;
237                    $('.voting-symbol').find('.star').each(function (i) {
238                        if (i < rate) {
239                            $(".star").eq(-(i + 1)).addClass('active');
240                        }
241                    });
242
243                    $('.post_rating .voting-result').text('Thank You!').fadeIn('fast');
244                }
245
246            },
247            error: function () {
248                $('.post_rating .ajax-loader').hide();
249                $('.post_rating .voting-result').text('Failed to rate, try again!').fadeIn('fast');
250            }
251        });
252    });
253
254    // **************  END:: Others SCRIPT  *************** //
255    // **************************************************** //
256
257
258
259    // **************  START EDUCON SCRIPT  *************** //
260    // **************************************************** //
261    // Top Search
262    $(".search-open-icon").on('click', function () {
263        $(".top-search-input-wrap, .top-search-overlay").fadeIn(200);
264        $(this).hide();
265        $('.search-close-icon').show().css('display', 'inline-block');
266    });
267
268    $(".search-close-icon, .top-search-overlay").on('click', function () {
269        $(".top-search-input-wrap, .top-search-overlay").fadeOut(200);
270        $('.search-close-icon').hide();
271        $('.search-open-icon').show();
272    });
273    // **************   END:: EDUCON SCRIPT   *************** //
274    // **************************************************** //
275});

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.