Skip to content

Commit

Permalink
Merge pull request #338 from lemoinem/fix/fix-jquery-version-comparison
Browse files Browse the repository at this point in the history
jQuery version comparison bug: parseFloat does not see 1.10 > 1.4
  • Loading branch information
Mottie committed Sep 11, 2013
2 parents 453c833 + b45ce55 commit aad8952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/jquery.tablesorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@
if (c.debug) { $.data( table, 'startoveralltimer', new Date()); }
// constants
c.supportsTextContent = $('<span>x</span>')[0].textContent === 'x';
c.supportsDataObject = parseFloat($.fn.jquery) >= 1.4;
c.supportsDataObject = (function(version) { version[0] = parseInt(version[0]) ; return (version[0] > 1) || (version[0] == 1 && parseInt(version[1]) >= 4); })($.fn.jquery.split("."));
// digit sort text location; keeping max+/- for backwards compatibility
c.string = { 'max': 1, 'min': -1, 'max+': 1, 'max-': -1, 'zero': 0, 'none': 0, 'null': 0, 'top': true, 'bottom': false };
// add table theme class only if there isn't already one there
Expand Down

0 comments on commit aad8952

Please sign in to comment.