Browse Source

Fix TypeError in sliders.js with non webkit browsers.

pull/442/head
XhmikosR 11 years ago
parent
commit
1cd634687d
  1. 2
      dist/js/ratchet.js
  2. 2
      dist/js/ratchet.min.js
  3. 2
      docs/dist/js/ratchet.js
  4. 2
      docs/dist/js/ratchet.min.js
  5. 2
      js/sliders.js

2
dist/js/ratchet.js vendored

@ -716,9 +716,11 @@
}; };
var getScroll = function () { var getScroll = function () {
if ('webkitTransform' in slider.style) {
var translate3d = slider.style.webkitTransform.match(/translate3d\(([^,]*)/); var translate3d = slider.style.webkitTransform.match(/translate3d\(([^,]*)/);
var ret = translate3d ? translate3d[1] : 0; var ret = translate3d ? translate3d[1] : 0;
return parseInt(ret, 10); return parseInt(ret, 10);
}
}; };
var setSlideNumber = function (offset) { var setSlideNumber = function (offset) {

2
dist/js/ratchet.min.js vendored

File diff suppressed because one or more lines are too long

2
docs/dist/js/ratchet.js vendored

@ -716,9 +716,11 @@
}; };
var getScroll = function () { var getScroll = function () {
if ('webkitTransform' in slider.style) {
var translate3d = slider.style.webkitTransform.match(/translate3d\(([^,]*)/); var translate3d = slider.style.webkitTransform.match(/translate3d\(([^,]*)/);
var ret = translate3d ? translate3d[1] : 0; var ret = translate3d ? translate3d[1] : 0;
return parseInt(ret, 10); return parseInt(ret, 10);
}
}; };
var setSlideNumber = function (offset) { var setSlideNumber = function (offset) {

2
docs/dist/js/ratchet.min.js vendored

File diff suppressed because one or more lines are too long

2
js/sliders.js

@ -36,9 +36,11 @@
}; };
var getScroll = function () { var getScroll = function () {
if ('webkitTransform' in slider.style) {
var translate3d = slider.style.webkitTransform.match(/translate3d\(([^,]*)/); var translate3d = slider.style.webkitTransform.match(/translate3d\(([^,]*)/);
var ret = translate3d ? translate3d[1] : 0; var ret = translate3d ? translate3d[1] : 0;
return parseInt(ret, 10); return parseInt(ret, 10);
}
}; };
var setSlideNumber = function (offset) { var setSlideNumber = function (offset) {

Loading…
Cancel
Save