Topic: hammer is not a function
Pedro Henrique Lira pro asked 5 years ago
swipe: function (id) {
$(id).hammer().on('swipeleft', function () {
$(this).carousel('next');
});
$(id).hammer().on('swiperight', function () {
$(this).carousel('prev');
});
}
Bartłomiej Malanowski staff answered 5 years ago
As of 4.5.7, we dropped Hammer.js as a dependency. You can read more on the changelog
Pedro Henrique Lira pro commented 5 years ago
Okay, but how do I now to use swipe event?
Bartłomiej Malanowski staff commented 5 years ago
As I can see, you're trying to add swipe to the carousel. As of Bootstrap 4.2, Carousel already supports touch events by default. You can read more here: https://mdbootstrap.com/docs/jquery/javascript/carousel/#options
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.7.7
- Device: iMac
- Browser: Chrome
- OS: OS X
- Provided sample code: No
- Provided link: Yes