From ba6fe216a4c0e5d2db58731f30b4daf5f8815adf Mon Sep 17 00:00:00 2001 From: Anton Grischenko Date: Sun, 3 May 2015 13:09:20 +0500 Subject: [PATCH] Added prevent event method #5 --- README.md | 4 ++- demo/index.html | 7 ++--- dist/amd/wheel-indicator.js | 35 +++++++++++++++------ dist/amd/wheel-indicator.min.js | 2 +- dist/commonjs/wheel-indicator.js | 35 +++++++++++++++------ dist/commonjs/wheel-indicator.min.js | 2 +- dist/es6/wheel-indicator.js | 35 +++++++++++++++------ dist/jquery/jquery.wheel-indicator.js | 35 +++++++++++++++------ dist/jquery/jquery.wheel-indicator.min.js | 2 +- dist/wheel-indicator.min.js | 2 +- lib/wheel-indicator.js | 38 ++++++++++++++++++----- 11 files changed, 140 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index 9e22cab..bef3ae9 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,15 @@ var indicator = new WheelIndicator(document.querySelector('.element')); indicator.on(function(e){ - console.log(e.direction); // "up" or "down" + e.prevent(); // если необходимо + console.log(e.direction); // "up" или "down" }); ``` **jquery** ```javascript $('.jquery').on('wheel-indicator', function(e){ + e.prevent(); // если необходимо console.log(e.direction); // "up" or "down" }); ``` diff --git a/demo/index.html b/demo/index.html index 3ad0da9..7b72984 100644 --- a/demo/index.html +++ b/demo/index.html @@ -3,7 +3,7 @@ - +