PageSourceSearch

https://uptownnightclub.com/wp-content/plugins/venuex-widgets-plugin/js/scripts.js?ver=7.1.2

js uptownnightclub.com collected 2026-10-02 11:07:21 UTC 5,238 bytes, 190 lines download raw bytes

1"use strict";
2
3/*************************************************************
4WIDGETS PLUGIN SCRIPTS
5
6TWITTER FEED WITH THEME DESIGN
7WIDGET: FACT BOX FITTEXT
8WIDGET: TABS
9TOGGLE
10ANIMATED NUMBER
11DONUT CHART
12
13*************************************************************/
14
15
16/*************************************************************
17TWITTER FEED WITH THEME DESIGN
18*************************************************************/
19
20	jQuery(document).ready(function($) {
21		if ($('.twitter_theme_design').size() > 0) {
22
23			var $twitterThemeDesignContainer = $('.twitter_theme_design');
24
25			$twitterThemeDesignContainer.each(function(index) {
26
27				var $this = $(this);
28
29				var useThemeDesign = $this.attr('data-theme_design');
30				if (useThemeDesign == "false") {
31					$this.hide();
32				} else {
33					var $associatedTwitterWidget = $this.prev('.twitter_widget');
34					$associatedTwitterWidget.hide();
35
36					$(window).load(function() {
37						//set vars
38						var success = false;
39						var delay = 100;
40						var attempts = 10;
41
42						for (var $i = 1; $i < attempts+1; $i++) {  
43									
44								setTimeout(function() {
45									if (success === false) {
46										var $twitterIframe = $this.prev('.twitter_widget').find('iframe');
47									    if ($twitterIframe.contents().find('.timeline-Tweet').size() > 0) {
48									    	success = true;	
49
50											//get and post tweets
51											var numTweets = $this.attr('data-num_tweets');
52											var tweetCount = 0;
53											$twitterIframe.contents().find('.timeline-Tweet').each(function(index, e){
54												if (tweetCount == numTweets) return;
55												var $this = $(this);
56												var published = $this.find('time').text();
57												var tweet = $this.find('.timeline-Tweet-text').html();
58												var altTweet = "<li class='tweet'><p>" + tweet + "</p><h6 class='meta'>" + published + "</span></li>";
59												var $associatedTwitterThemeDesignContainer = $twitterIframe.closest('.twitter_widget').next('.twitter_theme_design');
60												$associatedTwitterThemeDesignContainer.find('ul').append(altTweet);
61												tweetCount++;
62											});
63									    }
64									}
65
66								}, delay*$i);
67
68						} // end fori
69
70					}); // end on window load
71
72				} // end if else
73
74			}); // end each instance
75
76		}
77
78	});
79
80/*************************************************************
81WIDGET: FACT BOX FITTEXT
82*************************************************************/
83
84	jQuery(document).ready(function($) {
85		
86		if ($('.fittext').size() > 0) {
87			if (typeof fitText == "function") {
88				$('.fittext').each(function(index, el) {
89					var $this = $(this);
90					var ratio = $this.attr('data-ratio');
91					fitText($this, ratio);
92				});
93			}
94		}
95
96	});
97
98
99/*************************************************************
100WIDGET: TABS
101*************************************************************/
102
103	jQuery(document).ready(function($) {
104		
105		if ($('.widget.venuex_tabs').size() > 0) {
106
107			$('.widget.venuex_tabs').each(function(index) {
108				var $this = $(this);
109				var containerID = $this.find('.tab-container').attr('id');
110				$('#'+ containerID).cleanTabs();
111			});
112		}
113
114	});
115
116
117
118/*************************************************************
119TOGGLE
120*************************************************************/
121
122	jQuery(document).ready(function($){
123
124		if ($('.toggle-btn').size() > 0) {
125
126			// toggle	  
127			$('.toggle-btn').click(function(e){
128				e.preventDefault();
129				$(this).closest('li').find('.toggle-content').not(':animated').slideToggle();
130				$(this).toggleClass("active");
131			});
132		}
133
134	});
135
136
137
138/*************************************************************
139ANIMATED NUMBER
140*************************************************************/
141
142	jQuery(document).ready(function($){
143
144		if ($('.canon_animated_number').size() > 0) {
145
146			$('.canon_animated_number').each(function(index) {
147				var $this = $(this);
148				var number = parseInt($this.attr('data-number'));
149				var useSeperator = $this.attr('data-seperator');
150				var useSeperatorBoolean = (useSeperator == 'checked') ? true : false;
151				var animationSpeed = parseInt($this.attr('data-animation_speed'));
152
153				var $thisAnimatedNumberWrapper = $this.find('.canon_animated_number_wrapper');
154				$thisAnimatedNumberWrapper.animateNumbers(number, useSeperatorBoolean, animationSpeed);
155			});
156
157		}
158
159	});
160
161
162/*************************************************************
163DONUT CHART
164*************************************************************/
165
166	jQuery(document).ready(function($){
167
168
169		$('.donut_chart').each(function(index) {
170			var $thisChart = $(this);
171			var thisChartID = $thisChart.attr('id');
172			var instance = $.parseJSON($thisChart.attr('data-instance'));
173			var chartData = instance.chart_data;
174			var postfix = instance.postfix;
175			var colorArray = [];
176
177			$.each(chartData, function (index, value) {
178				colorArray.push(value.color);
179			});
180
181			Morris.Donut({
182				element: thisChartID,
183				data: chartData,
184				colors: colorArray,
185				formatter: function (y, data) { return y + postfix }, 
186			}).select(0);
187
188		});
189
190	});

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.