jQuery-Store-Locator-Plugin
jQuery-Store-Locator-Plugin copied to clipboard
default sorts distance by string not as a float
I thought it was my JSON the whole time, but it was the javascript.
if (this.settings.sortBy !== null && this.settings.sortBy.hasOwnProperty('order') && this.settings.sortBy.order.toString() === 'desc') {
locationsarray.sort(function (a, b) {
//return ((b[property] < a[property]) ? -1 : ((b[property] > a[property]) ? 1 : 0));
return (a-b);
});
But now Firefox is reversing the sort order!