Topic: Carousel Clickable
aganeto free asked 5 years ago
My carousel is working fine but I'd like the slides being clickable, sending the visitor for a specific page depending on the slide clicked.
How can I do that ?
Damian Gemza staff answered 5 years ago
Dear @aganeto
Just use an <a>
element to wrap up the <img>
tag in <mdb-carousel-item>
, and that's all.
Please take a look at the below code:
<mdb-carousel [animation]="'slide'">
<mdb-carousel-item>
<a href="https://google.com" target="_blank">
<img class="d-block w-100" src="https://mdbootstrap.com/img/Photos/Slides/img%20(130).jpg" alt="First slide">
</a>
</mdb-carousel-item>
</mdb-carousel>
Best Regards,
Damian
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Angular
- MDB Version: 7.5.0
- Device: ALL
- Browser: ALL
- OS: ALL
- Provided sample code: No
- Provided link: No