Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions SmoothScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ function init() {
activeElement = body;

initTest();

if ('string' == typeof options.excluded && 0 < options.excluded.length) {
options.excluded = document.body.querySelectorAll(options.excluded);
}

// Checks if this script is running in a frame
if (top != self) {
Expand Down Expand Up @@ -301,6 +305,14 @@ function wheel(event) {
var target = event.target;
var overflowing = overflowingAncestor(target);

if('object' == typeof options.excluded && 0 < options.excluded.length) {
for(var i = 0; i < options.excluded.length; i++) {
if(overflowing == options.excluded[i]) {
return true;
}
}
}

// use default if there's no overflowing
// element or default action is prevented
// or it's a zooming event with CTRL
Expand Down