First: Thanks for the SudoSlider. We're using it for years and are quite happy with it.
I was wondering why SudoSlider would refuse to use CSS for transitions. When I dug into the code, I found that SudoSlider set usecss to false because it believed the jQuery version was too low.
Unfortunately, the minJQueryVersion function is lying. It will only return true if all digits are greater than the required minimum, which is wrong when it comes to versions numbers.
Instead, the function should return early as soon as any digit is greater than required:
// The minVersion is specified in an array, like [1, 8, 0] for 1.8.0
function minJQueryVersion(minVersion) {
var version = $.fn.jquery.split(".");
var length = version.length
for (var i = 0; i < length; i++) {
if (+version[i] < +minVersion[i]) { return FALSE; }
if (+version[i] > +minVersion[i]) { return TRUE; }
}
return TRUE;
}
First: Thanks for the SudoSlider. We're using it for years and are quite happy with it.
I was wondering why SudoSlider would refuse to use CSS for transitions. When I dug into the code, I found that SudoSlider set
usecss
to false because it believed the jQuery version was too low.https://github.com/webbiesdk/SudoSlider/blob/33253a1ea51af256021ba81ddb4c4831369c1552/js/jquery.sudoSlider.js#L74-L76
Unfortunately, the
minJQueryVersion
function is lying. It will only returntrue
if all digits are greater than the required minimum, which is wrong when it comes to versions numbers.https://github.com/webbiesdk/SudoSlider/blob/33253a1ea51af256021ba81ddb4c4831369c1552/js/jquery.sudoSlider.js#L2899-L2909
Instead, the function should return early as soon as any digit is greater than required:
Best regards