materialize icon indicating copy to clipboard operation
materialize copied to clipboard

Carousel-Item href or click event listener not being triggered.

Open samlovescoding opened this issue 9 years ago • 5 comments

Description

I am currently working on an app using carousel. Below here is a general anchor tag in the carousel. <a class="carousel-item" id="carouselLink" href="show.html"><img src="assets/images/hosted/{}"></a> If you see the href is to a page called show.html. But when I click the image it just does not go to the page. So I added a click eventListener through jQuery. Even that is being not triggered. Is there any way I can add links to the carousel-item.

samlovescoding avatar May 17 '17 23:05 samlovescoding

Please provide a codepen. Generally click should work when the image is in the center / selected.

DanielRuf avatar May 18 '17 09:05 DanielRuf

I did make a pen - https://codepen.io/sampan/pen/BROEdp . The carousel was working there so I though wheres the problem then, I figured the problem. Dont worry, its still there. The links works fine on computers. But they dont work on mobiles. I switched to mobile view and it the links stop working. When switch to desktop view, they start working. I checked mobile view on code pen, turns out they don't have any mobile support.

samlovescoding avatar May 18 '17 11:05 samlovescoding

Duplicate of #4380 ?

ghost avatar May 19 '17 07:05 ghost

Seems so. The change should be reverted.

DanielRuf avatar May 19 '17 08:05 DanielRuf

Actually yes. #4380 does solved my problem. Someone please merge/close/delete this issue. And sone should remove the line in materialize.js which e.preventDefault(). helps alot. Thanks.

samlovescoding avatar May 20 '17 12:05 samlovescoding