Vlatko Murković
Vlatko Murković

Reputation: 67

Catch on scroll when scroll is disabled with overflow: hidden

I'd like to catch an event of scroll or touchmove with

$(document).on('scroll touchmove', function() {});

But that event is not working. Because i've used overflow:hidden; How can i catch these events and use custom animation instead of classic scrolling.

Upvotes: 1

Views: 79

Answers (1)

Ranjeet Singh
Ranjeet Singh

Reputation: 924

Check this

$(document).on('scroll touchmove', function() {
		console.log('scroll working...');
 });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<body style="min-height:1120px;"></body>

Upvotes: 1

Related Questions