Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Aron-Spiess's avatar

AlpineJS x-bind:href

This is mostly working but the href doesn't click. All the code renders.

<p class="text-shadow-black-md align-bottom text-3xl md:text-5xl" x-text="slide.title"></p>
                        <p class="text-shadow-black-md align-bottom mt-2 text-base text-white-100 
                        md:mt-5 md:text-lg md:max-w-xl md:mx-auto md:mt-5 md:text-xl lg:mx-0 "
                            x-text="slide.story"></p>
                        <a x-bind:href="slide.learn" x-bind:target="'_self'"
                            class="rounded-md bg-ah-red p-1 text-base w-1/4 cursor-pointer" >Learn More</a>   
0 likes
1 reply
Aron-Spiess's avatar
Aron-Spiess
OP
Best Answer
Level 1

revized code, found out the side buttons had higher z-index than the button,

		   <div class="z-10 relative">
                        <template x-if="slide.learn != '' ">
                            <a x-bind:href="slide.learn" x-bind:target="'_self'"
                                class="rounded-md bg-ah-red p-1 text-base" >Learn More</a> 
                        </template>  
                    </div>

Please or to participate in this conversation.