Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't click on added carousel items #1776

Open
morrow95 opened this issue Jan 4, 2020 · 2 comments
Open

Can't click on added carousel items #1776

morrow95 opened this issue Jan 4, 2020 · 2 comments

Comments

@morrow95
Copy link

morrow95 commented Jan 4, 2020

I am having trouble with the carousel when adding slides. Any slide I add with js has no click functionality in the carousel... I can't click on the thumbs of the carousel to 'go to' that image.

$('#slider2').flexslider({
	animation: "slide",
	controlNav: false,
	animationLoop: false,
	slideshow: false,
	itemWidth: 210,
	itemMargin: 5,
	asNavFor: '#slider'
});

$('#slider').flexslider({
	animation: "fade",
	animationLoop: false,
	animationSpeed: 400,
	controlNav: false,
	slideshow: false,
	slideshowSpeed: 5000,
	sync: "#slider2",
    start:function(slider){
        $(".slide-current-slide").text(slider.currentSlide+1);
        $(".slide-total-slides").text(" of "+slider.count);
    },
    before:function(slider){
        $(".slide-current-slide").text(slider.animatingTo+1);
    }
});

And an example of me adding a slide with js (ajax) :

//add the slide
slider.addSlide(''+
	'<li class="slides-content" data-id="'+value.screenshot_id+'">'+
		'<img src="/showimage.php?show='+value.image_filename+'" title="'+value.window_title+'" alt="">'+
	'</li>');					

//add the slide
slider2.addSlide(''+
	'<li data-id="'+value.screenshot_id+'">'+
		'<img src="/showimage.php?show='+value.image_filename+'" title="'+value.window_title+'" alt="">'+
	'</li>');
												
//correct the count
$(".slide-total-slides").text(" of "+slider.count);

Everything works as it should except you can't click on any of the carousel images except the first one that is loaded with the page... any that are added with js have no click functionality.

Any ideas?

@mavinothkumar
Copy link

I too facing the same issue. Any solution ?

@seanmortimer
Copy link

I've found this happens when the animation is not set the same for the slider and carousel. No idea why though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants