Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • 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