• Resolved goodermike

    (@goodermike)


    When I change the HTML Anchor on the carousel block, it does not change the name of the object in JS. Instead it just says splide01Carousel still.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Jensen

    (@dkjensen)

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

    Plugin Author David Jensen

    (@dkjensen)

    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

    Thread Starter goodermike

    (@goodermike)

    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?

    Plugin Author David Jensen

    (@dkjensen)

    Oh I see, you are referencing the JavaScript variable. Yeah it doesn’t make sense to have “Carousel” appended twice in that context, I’ll see about making an adjustment there.

    Thread Starter goodermike

    (@goodermike)

    Sounds good, thanks again for you help!

    Plugin Author David Jensen

    (@dkjensen)

    New version released which fixes the duplicate “Carousel” in the JS variable.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Setting HTML Anchor on block does not change JS variable name’ is closed to new replies.