PageSourceSearch

https://slovenskaskupnost.org/wp-content/themes/politist/js/main.js?ver=6.7.9

js slovenskaskupnost.org collected 2026-10-02 22:54:08 UTC 3,852 bytes, 120 lines download raw bytes

1/*global $:false */
2jQuery(document).ready(function($){'use strict';
3    
4    // Loader
5    $(window).load(function () {
6        if ($(".loader-wrap").length > 0)
7        {
8            $(".loader-wrap").delay(500).fadeOut("slow");
9        }
10    });
11
12    /* -------------------------------------- */
13    //      RTL Support Visual Composer
14    /* -------------------------------------- */
15    var delay = 1;
16    function themeum_rtl() {
17        if (jQuery("html").attr("dir") == 'rtl') {
18            if (jQuery(".entry-content > div").attr("data-vc-full-width") == 'true') {
19                var right = jQuery('.entry-content > div').css('right');
20                jQuery('.entry-content > div').css({ 'left': 'auto', 'right': right });
21            }
22            var $fullwidth = $('[data-vc-full-width="true"]');
23            $fullwidth.removeAttr('style').css('width': $fullwidth.width());
24        }
25    }
26    setTimeout( themeum_rtl , delay);
27
28    jQuery( window ).resize(function() {
29        setTimeout( themeum_rtl , delay);
30    }); 
31
32    // Sticky Nav
33    $(window).on('scroll', function(){
34        if ( $(window).scrollTop() > 0 ) {
35            $('#masthead').addClass('sticky');
36        } else {
37            $('#masthead').removeClass('sticky');
38        }
39    });
40
41	// Social Share ADD
42	$('.prettySocial').prettySocial();
43
44
45    //title first word
46    $('#sidebar .widget_title').not('#sidebar .widget_rss .widget_title').each(function() {'use strict';
47      var txt = $(this).html();
48      var index = txt.indexOf(' ');
49      if (index == -1) {
50         index = txt.length;
51      }
52    $(this).html('<span>' + txt.substring(0, index) + '</span>' + txt.substring(index, txt.length));
53    });    
54
55    //Woocommerce
56    jQuery( ".woocart" ).hover(function() {
57        jQuery(this).find('.widget_shopping_cart').stop( true, true ).fadeIn();
58    }, function() {
59        jQuery(this).find('.widget_shopping_cart').stop( true, true ).fadeOut();
60    }); 
61
62    jQuery('.woocart a').html( jQuery('.woo-cart').html() );
63
64    jQuery('.add_to_cart_button').on('click',function(){'use strict';
65
66        jQuery('.woocart a').html( jQuery('.woo-cart').html() );            
67
68        var total = 0;
69        if( jQuery('.woo-cart-items span.cart-has-products').html() != 0 ){
70            if( jQuery('woocart ul.cart_list').length  > 0 ){
71                for ( var i = 1; i <= jQuery('.woocart ul.cart_list').length; i++ ) {
72                    var total_string = jQuery('.woocart ul.cart_list li:nth-child('+i+') .quantity').text();
73                    total_string = total_string.substring(-3, total_string.length);
74                    total_string = total_string.replace('×', '');
75                    total_string = parseInt( total_string.trim() );
76                    //alert( total_string );
77                    if( !isNaN(total_string) ){ total = total_string + total; }
78                }
79            }
80        }
81        jQuery('.woo-cart-items span.cart-has-products').html( total+1 );
82    }); 
83
84    // Search onclick
85    $('.hd-search-btn').on('click', function(event) { 'use strict';
86        event.preventDefault();
87        var $searchBox = $('.home-search');
88        if ($searchBox.hasClass('show')) {
89            $searchBox.removeClass('show');
90            $searchBox.fadeOut('fast');
91        }else{
92            $searchBox.addClass('show');
93            $searchBox.fadeIn('slow');
94        }
95    });
96
97    $('.hd-search-btn-close').on('click', function(event) { 'use strict';
98        event.preventDefault();
99
100        var $searchBox = $('.home-search');
101        $searchBox.removeClass('show');
102        $searchBox.fadeOut('fast');
103    }); 
104
105
106    $('.cloud-zoom').magnificPopup({
107        type: 'image',
108        closeOnContentClick: true,
109        mainClass: 'mfp-img-mobile',
110        image: {
111                verticalFit: true
112            },
113    });
114
115
116
117});
118
119
120

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.