Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save dastagirkhan/38daf211fbce7e97ade6a8e27ecacede to your computer and use it in GitHub Desktop.

Select an option

Save dastagirkhan/38daf211fbce7e97ade6a8e27ecacede to your computer and use it in GitHub Desktop.
var body = document.querySelector('body');
// Create a manager to manager the element
var manager = new Hammer.Manager(body);
// Create a recognizer
var Swipe = new Hammer.Swipe();
// Add the recognizer to the manager
manager.add(Swipe);
// Subscribe to a desired event
manager.on('swipeleft', function(e) { console.log("swipedleft"); bootstrap.Offcanvas.getInstance(offcanvasDarkNavbar).show(); })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment