Can anyone help me get this script working for IE8? It works fine in Mozilla and WebKit browsers, but throws an error in IE8: ‘dataset.numValue’ is null or not an object.
var $wrapper = $('#containerInner'),
$sorted = $wrapper.find('.sortMe').get().sort(function (a, b) {
return +a.dataset.numValue - +b.dataset.numValue;
});
I know IE8 supports data attributes… but can’t figure out or find on Google an answer to this!
You should try using data() of jQuery instead of dataset.