Jquery slider [bxslider] - sliding problem

Hello experts,

this is the site I develope - goo.gl/YCMS3q .

Q: Why the slider of references on mobile devices doesn't scroll right? Just try and see please.
* On desktops it's ok [don't look at styling on desktop- it's not done yet].

This is the JS:
$(function() {

//calling the bxslider for testimonials
	$('.bx-clients').bxSlider();
//calling default bxslider for references
	var defaultSlides = $('#autoC').bxSlider();
	var currentSlides = 0;

	var counter = 0;
	//bxslider references switcher
	$('.controls-wrap li').on('click', function() {
		//removing any colored border of controls
		$('.controls-wrap li').removeClass('ctrl-active');
		//add border coler to clicked ctrl li
		$(this).addClass('ctrl-active');
		//set ctrl atribbute to variable
		var ctrlAtr = $(this).attr('data-id');
		//display none to active reference
		
		if (counter === 0) {
			defaultSlides.destroySlider();
			counter = 1;
		}
		else {
			currentSlides.destroySlider();

		}

		$('.references ul.ref-active').removeClass('ref-active').addClass('ref-none');
		$('.references ul#' + ctrlAtr).addClass('ref-active').removeClass('ref-none');
		
		currentSlides = $('#' + ctrlAtr).bxSlider();	
	});
});

Open in new window

LVL 1
Fajer39Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Fajer39Author Commented:
Julian it's not a duplicated question....it's the same site but very different problem...
* I have TYPO here only- instead of "scroll" it should be "slide"
Julian HansenCommented:
Apologies I have removed the request for attention.

I have tested both but cannot see what you are referring to - slider scrolls left and right and appears to be fine.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Fajer39Author Commented:
Try to change the reference -> then slide for the next and you'll see that the slider jumps over 1 image e.g.
THis is because when you selecting different references and the slider is reinitiated, it's not displaying the first li of the ul- that means first image of the set and I don't know why. Give it a try and you'll see.
Julian HansenCommented:
Give it a try and you'll see.
I have several times - slider appears to work as expected I have tried it in several places including online emulators - it seems to work.
Fajer39Author Commented:
Well on IOS it shows the last image first instead of the first one, everywhere else works OK. I guess I should set Javascript lazy loading script for those images, because now every browser do it by itself and it seems that safari on mobile doesn't work right.

Any suggestions?
Julian HansenCommented:
You could try this.

Hide all images except the first - bind to the .load on the first image and show the remaining images when it fires.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fajer39Author Commented:
I found that the problem is with bxslider and absolute position slides with infinity loop on. I just turn the infinity loop off and it works as expected.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.