0
function sort_multi_select(select)
{
var x = jQuery(select + \' option\');
x.remove();
x.sort(function(a,b) { a = a.firstChild.nodeValue; b = b.firstChild.nodeValue; if (a==b) return 0; return (a>b) ? 1 : -1; });
x.appendTo(select);
};
Useage sample: sort_multi_select('#id_of_select');
Voir en ligne : By Mrmenke in the comments on Ricky Rosario’s blog
DATE 07 Juin 2011
