I have a div with elements inside that i would like to sort by data value.
$('div#mainFrame div.element-container').sort(function(a, b)
{
return parseInt($(a).data('price')) < parseInt($(b).data('price'));
})
.appendTo('div#mainFrame');
I've tried it with chrome/firefox(pc) where it works perfectly fine, however it does not work with safari nor does it work with the android browser.