PageSourceSearch

https://corporinoquia.gov.co/templates/ts_vinazine/js/main.js

js corporinoquia.gov.co collected 2026-10-02 07:25:33 UTC 6,144 bytes, 203 lines download raw bytes

1/**
2 * @package Helix Ultimate Framework
3 * @author JoomShaper https://www.joomshaper.com
4 * @copyright Copyright (c) 2010 - 2018 JoomShaper
5 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
6*/
7
8jQuery(function ($) {
9
10    // Stikcy Header
11    if ($('body').hasClass('sticky-header')) {
12        var header = $('.ts-header-nav');
13
14        if($('.ts-header-nav').length) {
15            var headerHeight = header.outerHeight();
16            var stickyHeaderTop = header.offset().top;
17            var stickyHeader = function () {
18                var scrollTop = $(window).scrollTop();
19                if (scrollTop > stickyHeaderTop) {
20                    header.addClass('header-sticky');
21                } else {
22                    if (header.hasClass('header-sticky')) {
23                        header.removeClass('header-sticky');
24                    }
25                }
26            };
27            stickyHeader();
28            $(window).scroll(function () {
29                stickyHeader();
30            });
31        }
32
33        if ($('body').hasClass('layout-boxed')) {
34            var windowWidth = header.parent().outerWidth();
35            header.css({"max-width": windowWidth, "left": "auto"});
36        }
37    }
38
39
40       /* ----------------------------------------------------------- */
41   /*  Site search
42    /* ----------------------------------------------------------- */
43
44   $('.nav-search-icon').on('click', function () {
45      $('.nav-search-form').fadeIn(100);
46      $(this).fadeOut(100);
47   });
48
49   $('.search-close').on('click', function () {
50      $('.nav-search-form').fadeOut(100);
51      $('.nav-search-icon').fadeIn(100);
52   });
53
54    /* ----------------------------------------------------------- */
55      /*  user login
56    /* ----------------------------------------------------------- */
57   $('.user-login-btn').on('click', function () {
58      $('.ts-login-form').fadeIn(100);
59      $('.user-login-popup').addClass('login-popup-show');
60   });
61
62   $('.user-login-close').on('click', function () {
63      $('.ts-login-form').css('display', 'none');
64      $('.user-login-popup').removeClass('login-popup-show');
65   });
66
67   $(document).on('mouseup', function (e) {
68      var container = $(".ts-login-form");
69
70      if (!container.is(e.target) && container.has(e.target).length === 0) {
71          $(".ts-login-form").css('display', 'none');
72          $('.user-login-popup').removeClass('login-popup-show');
73      }
74
75  });
76
77
78   /* ----------------------------------------------------------- */
79      /* Tab menu hover 
80    /* ----------------------------------------------------------- */
81
82   // $('.sppb-nav[data-toggle="sppb-tab"] > li > a').hover( function(){
83   //    $(this).sppb-tab('show');
84   // });
85
86
87   $('.ts-lifestyle-tab-menu .sppb-nav a').hover(function(e) {
88      
89      var container = $(this).parents('.ts-lifestyle-tab-menu');
90      var target = $(this).attr('href');
91
92      // removes all active classes
93      container.find('ul.sppb-nav li').removeClass('active');
94
95      // remove the panel active classes
96      container.find('.sppb-tab-pane').removeClass('active in');
97
98
99      // adds active class
100      $(this).parent().addClass('active');
101      $(target).addClass('active in');
102
103   });
104   
105
106   $('.ts-lifestyle-tab-menu .sppb-nav a').click(function(e) {
107      e.preventDefault();
108      return false;
109   });
110   
111    // go to top
112    $(window).scroll(function () {
113        if ($(this).scrollTop() > 100) {
114            $('.sp-scroll-up').fadeIn();
115        } else {
116            $('.sp-scroll-up').fadeOut(400);
117        }
118    });
119
120    $('.sp-scroll-up').click(function () {
121        $("html, body").animate({
122            scrollTop: 0
123        }, 600);
124        return false;
125    });
126
127    // Preloader
128    $(window).on('load', function () {
129        $('.sp-preloader').fadeOut(500, function() {
130            $(this).remove();
131        });
132    });
133
134    //mega menu
135    $('.sp-megamenu-wrapper').parent().parent().css('position', 'static').parent().css('position', 'relative');
136    $('.sp-menu-full').each(function () {
137        $(this).parent().addClass('menu-justify');
138    });
139
140    // Offcanvs
141    $('#offcanvas-toggler').on('click', function (event) {
142        event.preventDefault();
143        $('.offcanvas-init').addClass('offcanvas-active');
144    });
145
146    $('.close-offcanvas, .offcanvas-overlay').on('click', function (event) {
147        event.preventDefault();
148        $('.offcanvas-init').removeClass('offcanvas-active');
149    });
150    
151    $(document).on('click', '.offcanvas-inner .menu-toggler', function(event){
152        event.preventDefault();
153        $(this).closest('.menu-parent').toggleClass('menu-parent-open').find('>.menu-child').slideToggle(400);
154    });
155
156    //Tooltip
157    $('[data-toggle="tooltip"]').tooltip();
158
159    // Article Ajax voting
160    $('.article-ratings .rating-star').on('click', function (event) {
161        event.preventDefault();
162        var $parent = $(this).closest('.article-ratings');
163
164        var request = {
165            'option': 'com_ajax',
166            'template': template,
167            'action': 'rating',
168            'rating': $(this).data('number'),
169            'article_id': $parent.data('id'),
170            'format': 'json'
171        };
172
173        $.ajax({
174            type: 'POST',
175            data: request,
176            beforeSend: function () {
177                $parent.find('.fa-spinner').show();
178            },
179            success: function (response) {
180                var data = $.parseJSON(response);
181                $parent.find('.ratings-count').text(data.message);
182                $parent.find('.fa-spinner').hide();
183
184                if(data.status)
185                {
186                    $parent.find('.rating-symbol').html(data.ratings)
187                }
188
189                setTimeout(function(){
190                    $parent.find('.ratings-count').text('(' + data.rating_count + ')')
191                }, 3000);
192            }
193        });
194    });
195
196    if ($(".ts-video-scroll-tab .gkSmallBlock").length > 0) {
197      $(".ts-video-scroll-tab .gkSmallBlock").mCustomScrollbar({
198          mouseWheel: true,
199          scrollButtons: { enable: true }
200      });
201  }
202
203});

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.