javascript - How do you sort alphabetical without case sensitive -


this question has answer here:

how make alpha sort not case sensitive? understand should use tolowercase don't know how.

sort_alpha: function(a,b) {     if (a[0]==b[0]) return 0;     if (a[0]<b[0]) return -1;     return 1; } 

you need turn , b lower case

var lower_a = a.tolowercase(); var lower_b = b.tolowercase(); 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -