PageSourceSearch

https://tinyideasoxford.com/wp-content/plugins/logo-slider-wp/publ…/js/logo-slider-wp-public.js?ver=6.0.0

js tinyideasoxford.com collected 2026-10-04 04:24:22 UTC 12,119 bytes, 301 lines download raw bytes

1(function ($) {
2	'use strict';
3
4	/**
5	 * All of the code for your public-facing JavaScript source
6	 * should reside in this file.
7	 *
8	 * Note: It has been assumed you will write jQuery code here, so the
9	 * $ function reference has been prepared for usage within the scope
10	 * of this function.
11	 *
12	 * This enables you to define handlers, for when the DOM is ready:
13	 *
14	 * $(function() {
15	 *
16	 * });
17	 *
18	 * When the window is loaded:
19	 *
20	 * $( window ).load(function() {
21	 *
22	 * });
23	 *
24	 * ...and/or other possibilities.
25	 *
26	 * Ideally, it is not considered best practise to attach more than a
27	 * single DOM-ready or window-load handler for a particular page.
28	 * Although scripts in the WordPress core, Plugins and Themes may be
29	 * practising this, we should strive to set a better example in our own work.
30	 */
31
32	/*
33		try {
34			$('.lgx_app_item_link').tooltipster();
35		} catch(e) {
36			//console.log('not start');
37		}
38	*/
39
40	// Update date : 05.07.2026, By : @VibeLogic
41	function lgxLogoSliderInit( scope ) {
42		var $ = window.jQuery;
43		var $scope = typeof scope !== 'undefined' ? $( scope ) : $( document );
44
45		if ( $scope.filter( '.lgx_logo_carousel' ).add( $scope.find( '.lgx_logo_carousel' ) ).length ) {
46			$scope.filter( '.lgx_logo_carousel' ).add( $scope.find( '.lgx_logo_carousel' ) ).each(function (index) {
47				if ( this.swiper ) { return; }
48
49
50				var lgx_logo_carousel_item = $(this);
51				var lgxLogoCarouselDataAttr = lgx_logo_carousel_item.data();
52				var lgx_logo_carousel_id = lgx_logo_carousel_item.attr('id');
53				
54				var lgxLogoPagination = lgxLogoCarouselDataAttr.pagination;
55				var lgxLogoNavigation = lgxLogoCarouselDataAttr.nav;
56				// Task 011b (2026-07-27): was reading .infinite (Loop) instead of
57				// .autoplay — Autoplay and Infinite Loop are independent settings;
58				// this variable gates Swiper's autoplay config and must read the
59				// Autoplay setting, not Loop. See docs/ui/showcase/task011b/.
60				var lgxLogoAutoplay = lgxLogoCarouselDataAttr.autoplay;
61				var lgxLogoTicker = lgxLogoCarouselDataAttr.ticker;
62				// B39: Ticker's continuous scroll is driven entirely by Swiper's JS
63				// autoplay loop (delay: 0), not a CSS animation — a prefers-reduced-motion
64				// media query alone can't stop it, so the OS preference is checked here
65				// and autoplay is skipped for ticker mode only, matching B38's pause/stop
66				// accessibility stance. Non-ticker autoplay is untouched.
67				var lgxTickerReducedMotion = lgxLogoTicker == true &&
68					window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
69
70				if (lgx_logo_carousel_item.length > 0) {
71					var $appArea = lgx_logo_carousel_item.closest('.lgx_app_content_area');
72					var $nextBtn = $appArea.find('.lgx_lsw_nav_button_next');
73					var $prevBtn = $appArea.find('.lgx_lsw_nav_button_prev');
74					var $pagination = $appArea.find('.swiper-pagination');
75
76					// Pass the raw DOM node (this) to Swiper instead of string selector for iframe compatibility
77					var lgxLogoSwiper = new Swiper(this, {
78						lazy: lgxLogoCarouselDataAttr.lazy,
79						loop: lgxLogoTicker == true ? true : lgxLogoCarouselDataAttr.infinite,
80						speed: parseInt(lgxLogoCarouselDataAttr.speed),
81						autoplay:
82							lgxLogoAutoplay == true
83								? {
84									delay: lgxLogoTicker == true ? 0 : parseInt(lgxLogoCarouselDataAttr.delay),
85									disableOnInteraction: false,
86									// Task 014 (B38) Item 3: was `lgxLogoCarouselDataAttr.pause`.
87									// Found during live verification that Swiper's OWN internal
88									// pauseOnMouseEnter mechanism (Autoplay module's onMouseLeave,
89									// confirmed by reading swiper-bundle.js) calls run() directly,
90									// bypassing the public start()/stop() API entirely — meaning it
91									// cannot be intercepted by the manual-pause guard below, and it
92									// left swiper's internal `timeout` in a state that made a later
93									// .autoplay.start() silently no-op. Hardcoded false here — the
94									// plugin's own redundant jQuery hover handlers just below
95									// already fully replicate this exact behavior (confirmed
96									// identical in report 001 §2) and are the ones actually guarded,
97									// so disabling Swiper's internal copy changes no observable
98									// behavior, it just removes an unguardable duplicate mechanism.
99									pauseOnMouseEnter: false,
100									// Task 014 (B38) Item 5, Option A: pass a real object with
101									// enabled:false instead of the whole option becoming the
102									// literal boolean false. Behavior-preserving for B39's own
103									// outcome (Swiper's Autoplay module only auto-starts on
104									// init when params.autoplay.enabled is true — confirmed by
105									// reading swiper-bundle.js's on('init', ...) hook), but it
106									// also means swiper.params.autoplay.delay/pauseOnMouseEnter
107									// keep their real configured values instead of Swiper's
108									// module defaults (3000ms) — required so a later manual
109									// .autoplay.start() (hover-pause resuming, or the new
110									// pause/play button) restarts at the correct Ticker speed
111									// instead of the wrong default one.
112									enabled: !lgxTickerReducedMotion,
113								}
114								: false,
115						spaceBetween: parseInt(lgxLogoCarouselDataAttr.space),
116						slidesPerView: parseInt(lgxLogoCarouselDataAttr.item_mobile),
117						allowTouchMove: lgxLogoCarouselDataAttr.move,
118						simulateTouch: lgxLogoCarouselDataAttr.simulate,
119						grabCursor: lgxLogoCarouselDataAttr.grab,
120						mousewheel: lgxLogoCarouselDataAttr.wheel,
121						autoHeight: lgxLogoCarouselDataAttr.height,
122						freeMode: lgxLogoTicker == true ? true : false,
123						effect: lgxLogoCarouselDataAttr.effect,
124						coverflowEffect: {
125							rotate: 30,
126							slideShadows: false,
127						},
128						pagination:
129							lgxLogoPagination == true
130								? {
131									el: $pagination.length ? $pagination[0] : '.swiper-pagination',
132									type: 'bullets',
133									clickable: true,
134									dynamicBullets: lgxLogoCarouselDataAttr.dynamic,
135									dynamicMainBullets: parseInt(lgxLogoCarouselDataAttr.bullets_no),
136								}
137								: false,
138						navigation:
139							lgxLogoNavigation == true
140								? {
141									nextEl: $nextBtn.length ? $nextBtn[0] : '.lgx_lsw_nav_button_next',
142									prevEl: $prevBtn.length ? $prevBtn[0] : '.lgx_lsw_nav_button_prev'
143								}
144								: false,
145
146						breakpoints: {
147							320: {
148								slidesPerView: parseInt(lgxLogoCarouselDataAttr.item_mobile),
149							},
150							768: {
151								slidesPerView: parseInt(lgxLogoCarouselDataAttr.item_tablet),
152							},
153							992: {
154								slidesPerView: parseInt(lgxLogoCarouselDataAttr.item_desk),
155							},
156							1200: {
157								slidesPerView: parseInt(lgxLogoCarouselDataAttr.item_large),
158							},
159						},
160						loopFillGroupWithBlank: true,
161						fadeEffect: {
162							crossFade: true
163						},
164						keyboard: {
165							enabled: true
166						},
167					})
168					if (lgxLogoCarouselDataAttr.autoplay === false) {
169						lgxLogoSwiper.autoplay.stop()
170					}
171					// Task 014 (B38) Item 3: per-instance flag so a deliberate manual
172					// pause (from the new pause/play button below) isn't silently
173					// overridden by Pause-on-Hover's own mouseleave handler, which
174					// otherwise calls .autoplay.start() unconditionally.
175					var lgxTickerManuallyPaused = !lgxLogoSwiper.autoplay.running;
176					if (lgxLogoCarouselDataAttr.pause && lgxLogoCarouselDataAttr.autoplay) {
177						lgx_logo_carousel_item.hover(
178							function () {
179								lgxLogoSwiper.autoplay.stop()
180							},
181							function () {
182								if (!lgxTickerManuallyPaused) {
183									lgxLogoSwiper.autoplay.start()
184								}
185							}
186						)
187						lgx_logo_carousel_item.mouseenter(function () {
188							lgxLogoSwiper.autoplay.stop();
189						});
190						lgx_logo_carousel_item.mouseleave(function () {
191							if (!lgxTickerManuallyPaused) {
192								lgxLogoSwiper.autoplay.start();
193							}
194						});
195					}
196
197					// Task 014 (B38) Item 4: keyboard/touch-accessible pause/play
198					// control for Ticker Mode (WCAG 2.2.2). A native <button> needs no
199					// custom keydown handling for Enter/Space — the browser already
200					// activates it natively. Swiper's own Keyboard module (enabled
201					// above) only listens for arrow/PageUp/PageDown keys, confirmed by
202					// reading swiper-bundle.js, so there is no key-binding collision.
203					// aria-pressed is set here, never in the PHP-rendered markup,
204					// because wp_kses_post()'s allowed-attributes list doesn't include
205					// aria-pressed and would silently strip it.
206					var $tickerPauseBtn = $appArea.find('.lgx_lsw_ticker_pause_btn');
207					if ($tickerPauseBtn.length) {
208						var $tickerPauseIcon = $tickerPauseBtn.find('i');
209
210						function updateTickerPauseBtnState() {
211							if (lgxTickerManuallyPaused) {
212								$tickerPauseIcon.removeClass('fa-pause').addClass('fa-play');
213								$tickerPauseBtn.attr('aria-pressed', 'true');
214								$tickerPauseBtn.attr('aria-label', lgxLsPublicI18n.tickerResume);
215							} else {
216								$tickerPauseIcon.removeClass('fa-play').addClass('fa-pause');
217								$tickerPauseBtn.attr('aria-pressed', 'false');
218								$tickerPauseBtn.attr('aria-label', lgxLsPublicI18n.tickerPause);
219							}
220						}
221
222						updateTickerPauseBtnState();
223
224						$tickerPauseBtn.on('click', function () {
225							lgxTickerManuallyPaused = !lgxTickerManuallyPaused;
226							if (lgxTickerManuallyPaused) {
227								lgxLogoSwiper.autoplay.stop();
228							} else {
229								lgxLogoSwiper.autoplay.start();
230							}
231							updateTickerPauseBtnState();
232						});
233					}
234					/*Final End*/
235
236					$(window).off('resize.lgx_' + lgx_logo_carousel_id).on('resize.lgx_' + lgx_logo_carousel_id, function () {
237						lgxLogoSwiper.update()
238					})
239					$(window).trigger('resize.lgx_' + lgx_logo_carousel_id)
240				}
241
242			}); //Swiper Each
243		}
244
245
246		if ( $scope.filter( '.lgx_app_item_tooltip' ).add( $scope.find( '.lgx_app_item_tooltip' ) ).length ) {
247			$scope.filter( '.lgx_app_content_wrapper' ).add( $scope.find( '.lgx_app_content_wrapper' ) ).each(function (index) {
248				if ( $(this).data('lgx-tooltip-initialized') ) { return; }
249				$(this).data('lgx-tooltip-initialized', true);
250
251				var lgx_ls_tt_item = $(this);
252				var lgx_showcase_id = lgx_ls_tt_item.attr('id');
253				var lgx_tooltip_data_row = lgx_ls_tt_item.find('.lgx_app_item_row');
254				var lgxTtDataAttr = lgx_tooltip_data_row.data();
255				
256				lgx_ls_tt_item.find('.lgx_app_item_tooltip').tooltipster({
257					//position:'top',
258					side: lgxTtDataAttr.tt_position,
259					animation: lgxTtDataAttr.tt_anim,
260					animationDuration: lgxTtDataAttr.tt_duration,
261					arrow: lgxTtDataAttr.tt_arrow,
262					delay: lgxTtDataAttr.tt_delay,
263					distance: lgxTtDataAttr.tt_distance,
264					trigger: lgxTtDataAttr.tt_trigger,
265					minIntersection: lgxTtDataAttr.tt_intersection,
266					timer: lgxTtDataAttr.tt_timer,
267					theme: 'lgx_lsw_tooltipster_' + lgxTtDataAttr.tt_id,
268					maxWidth: lgxTtDataAttr.tt_maxwidth,
269					minWidth: lgxTtDataAttr.tt_minwidth
270				});
271			}); //each
272		}
273
274		/*	$('.lgx_app_item_row').masonry({
275				// options
276				itemSelector: '.lgx_app_item',
277			   columnWidth: 200,
278				gutter: 10,
279				//fitWidth: true
280			});
281	*/
282
283
284		if ( $scope.filter( '.lgx_lsw_preloader' ).add( $scope.find( '.lgx_lsw_preloader' ) ).length ) {
285			$scope.filter( '.lgx_logo_slider_app' ).add( $scope.find( '.lgx_logo_slider_app' ) ).each(function () {
286				var lgx_lsw_preloader_item = $(this).children('.lgx_lsw_preloader');
287				$(lgx_lsw_preloader_item).animate({ opacity: 0 }, 600).remove();
288			})
289		}
290	}
291
292	// Update date : 05.07.2026, By : @VibeLogic
293	jQuery(document).ready(function () {
294		lgxLogoSliderInit();
295	});//DOM
296
297	// Update date : 05.07.2026, By : @VibeLogic
298	window.LgxLogoSlider = window.LgxLogoSlider || {};
299	window.LgxLogoSlider.init = lgxLogoSliderInit;
300
301})(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.