Setting HTML Anchor on block does not change JS variable name

[ad_1]

Thanks for informing me of this issue, I will look into it and release and update right away.

I just released version 1.4.3 which addresses this issue. The HTML anchor should of been applied previously, but it was applied to the parent element:

<div class="wp-block-cloudcatch-splide-carousel wp-block-splide-carousel__container" id="test" />

Because HTML IDs should be unique, I have updated the plugin so the <figure> (the actual splide carousel) inherits the ID, but appends Carousel to the end.

So if you give the carousel an anchor of test, the parent element will have the ID of test, while the carousel itself (the <figure>) will have an ID of testCarousel.

I hope this helps

Thank you very much for your speedy reply and fix! This works fine for me now, but it might be worth mentioning that the object is now called testCarouselCarousel when the anchor is set to “test”. Just seems like it’s appending an extra “Carousel” when the object is created, or perhaps that is intentional?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer