Click event will not allow scrolling fire event

I am doing a scroll scroller with click events on children.

<div class="parralaxParallaxScroller---1" data-ltr="true" data-column="0" style="left: 172px; width: 768px; height: 1153px; position: absolute; top: 3374px; z-index: 0;"><img onclick="location.href='http://admaxim.com' " src="https://s3.amazonaws.com/cdn.admaxim/r6woe2.jpeg" style="position:absolute;top:0;left:0"></div> 

The problem I am facing is that when drawing an image in a view on mobile devices. scrolling stops working. I think because of this onclick event. as on images without scrolling, the URL works fine. any ideas how to avoid this?

+5
source share
1 answer

I hope this works. Thanks.

 <div class="parralaxParallaxScroller---1" data-ltr="true" data-column="0" style="left: 172px; width: 768px; height: 1153px; position: absolute; top: 3374px; z-index: 0;"> <a onclick="location.href='http://admaxim.com'"> <img src="https://s3.amazonaws.com/cdn.admaxim/r6woe2.jpeg" style="position:absolute;top:0;left:0"> </a> </div> 
+4
source

Source: https://habr.com/ru/post/1276096/


All Articles