Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort divs alphabetically jquery

$('.sortme').sort(function(a, b) {
  if (a.textContent < b.textContent) {
    return -1;
  } else {
    return 1;
  }
}).appendTo('body');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #divs #alphabetically #jquery
ADD COMMENT
Topic
Name
5+2 =