PageSourceSearch

https://theartmomentum.com/wp-content/plugins/tk-shortcodes/public/js/tk-shortcodes-public.js?ver=2.0.0

js theartmomentum.com collected 2026-10-02 11:51:23 UTC 4,023 bytes, 154 lines download raw bytes

1(function( $ ) {
2	'use strict';
3
4		jQuery(document).ready(function(){
5
6            // Responsive columns fix
7
8			var sixthColumn      = $('.row-columns .column-lg-2');
9			var sixthColumnWidth = sixthColumn.outerWidth();
10
11            if( sixthColumnWidth < 120){
12                sixthColumn.removeClass('column-lg-2');
13                sixthColumn.addClass('column-lg-4');
14            }
15
16		    // Tabs
17
18		    var tabsBlock = $('.tk-shortcode-tabs');
19
20		    if($().tabs) {
21		        tabsBlock.tabs({
22		            show: true
23		        });
24		    }
25
26		    var activeTab = $('.tk-shortcode-tabs .tk-nav-tabs').find('.ui-state-active');
27		    activeTab.addClass('active');
28
29		    $('.ui-tabs-anchor').click(function(){
30		    	$(this).parent().addClass('active');
31		    	$('.tk-shortcode-tabs .tk-nav-tabs > li').not('.ui-state-active').removeClass('active');
32		    });
33
34	    	function checkTabsWidth(){
35		        tabsBlock.each(function(){
36
37		            var $this = $(this);
38		            var tabsNav = $this.find('.tk-nav-tabs');
39		            var tabsNavItem = tabsNav.find('li');
40		            var tabsNavWidth = 0;
41
42		            tabsNavItem.each(function () {
43		                tabsNavWidth += $(this).width();
44		            });
45
46		            var tabsContentWidth = tabsNav.next('.tab-content').width();
47
48		            if(tabsNavWidth > tabsContentWidth){
49		                tabsNav.find('li').addClass('fullwidth');
50		            }
51
52		        });
53		    }
54
55		    $(window).load(function(){
56			    checkTabsWidth();
57		    });
58
59		    $(window).resize(function(){
60		        checkTabsWidth();
61		    });
62
63
64		    // Toggles
65
66		    var toggleHeader = $('.tk_toggle .tab-head');
67
68		    toggleHeader.each( function() {
69				var toggle       = $(this).parent();
70				var toggle_state = toggle.data('state');
71
72				if('opened' == toggle_state){
73					toggle.toggleClass('opened').find('.tab-body').animate({height: 'toggle'}, 400);
74					toggle.addClass('opened');
75				}
76
77		        $(this).click(function() {
78		            toggle.toggleClass('opened').find('.tab-body').animate({height: 'toggle'}, 400);
79		            return false;
80		        });
81
82		    });
83
84		    // Accordion
85
86		    var accordionBlock = $('.tk_accordion');
87
88		    accordionBlock.each(function(){
89		        var $this = $(this);
90		        var accordionHeader = $this.find('.tab-head');
91
92		        function accordionAddClass(){
93		            if($this.hasClass('opened')){
94		                accordionHeader.next().slideDown();
95		            }
96		            else{
97		                accordionHeader.next().slideUp();
98		            }
99		        }
100
101		        accordionAddClass();
102
103		        accordionHeader.click(function(){
104		            var $this = $(this);
105		            $this.parent().siblings().removeClass('opened').find('.tab-body').slide
105Up();
106		            if($this.parent().hasClass('opened')){
107		                $this.parent().removeClass('opened');
108		            }
109		            else{
110		                $this.parent().addClass('opened');
111		            }
112		            accordionAddClass();
113		        });
114
115		    });
116
117		    // Infobox
118
119		    var infoBoxClose = $('.close-infobox');
120
121		    infoBoxClose.click(function(){
122		        var $this = $(this);
123		        $this.parent().fadeOut();
124		    });
125
126		    // Progress Bar
127
128
129		    function barPercentage(){
130		        var progressBar = $('.tk-progress');
131		        progressBar.each(function(){
132		            var $this = $(this);
133		            var progressBarLoaded = $this.find('.bar');
134		            var progressBarLoadedAmount = parseInt(progressBarLoaded.data('width'));
135		            $this.find('.bar-percentage').text(progressBarLoadedAmount+'%');
136		        });
137		    }
138
139		    barPercentage();
140
141		    var progressBarLoaded = $('.tk-progress').find('.bar');
142
143		    progressBarLoaded.each(function(){
144		        var $this = $(this);
145		        var value = parseInt($this.data('width'));
146
147		        setTimeout(function(){
148		            $this.animate({width: value+'%'}, 800);
149		        }, 1000);
150		    });
151
152	});
153
154})( jQuery );

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.