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

Jcarousel captions strange behavior #853

Open
bondweb opened this issue Jun 16, 2021 · 0 comments
Open

Jcarousel captions strange behavior #853

bondweb opened this issue Jun 16, 2021 · 0 comments

Comments

@bondweb
Copy link

bondweb commented Jun 16, 2021

Hi there I add

	$('.jcarousel').on('jcarousel:visiblein', 'li', function(event, carousel) {
var caption = $(this).find("img").prop("alt");
$('.jcarousel-caption').text(caption);

in the jcarousel.basic.js to show alt text like an image caption

I also add

in the carousel html file

<h3 class="jcarousel-caption"></h3>

It's working, but jcarosel doesn't shows the first image caption after the page loading.

jcarousel shows the first image caption only after click the jcarousel-control-prev and jcarousel-control-next

There's anyone can help me to understand why?

Thanks in advance

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

1 participant