Skip to content

Commit

Permalink
Merge pull request #15 from e10jc/patch-1
Browse files Browse the repository at this point in the history
bug fix for browsers that don't support HTML5 dataset attribute
  • Loading branch information
pbakaus committed Jun 6, 2016
2 parents a486b79 + 3bf77b2 commit a21f4dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/EasyScroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ document.addEventListener("DOMContentLoaded", function() {
for (var i = 0; i < elements.length; i++) {

element = elements[i];
var scrollable = element.dataset.scrollable;
var zoomable = element.dataset.zoomable || '';
var scrollable = element.attributes.getNamedItem('data-scrollable') ? element.attributes.getNamedItem('data-scrollable').value : null;
var zoomable = element.attributes.getNamedItem('data-zoomable') ? element.attributes.getNamedItem('data-zoomable').value : '';
var zoomOptions = zoomable.split('-');
var minZoom = zoomOptions.length > 1 && parseFloat(zoomOptions[0]);
var maxZoom = zoomOptions.length > 1 && parseFloat(zoomOptions[1]);
Expand Down

0 comments on commit a21f4dc

Please sign in to comment.