Using jQuery TinySort plugin to sort by attribute
-
06-06-2023 - |
Pregunta
I have an unordered list with class name .summary_ul with a number of list items of class .summary_ul_li, each of which has a 'val' attribute whose value is a string of letters. I am calling this function from the javascript file:
function sort_by_val(){
var $tosort = $('.summary_ul_li');
$tosort.tsort({attr:"val"});
}
However, $tosort does not sort, and remains in its original order. I am trying to use this plugin:
Is there something I'm missing here?
No hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow