Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.data.sort(function(a , b)
- {
- if(isNaN(a[col]) || isNaN(b[col]))
- {
- var temp = new Array(a[col].toUpperCase() , b[col].toUpperCase());
- var filter = new RegExp(/W/g);
- temp[0] = temp[0].replace( filter , "" );
- temp[1] = temp[1].replace( filter , "" );
- temp.sort();
- if(temp[0] == a[col].toUpperCase() && temp[1] == b[col].toUpperCase())
- {
- return -1;
- }
- else
- {
- return 1;
- }
- }
- else
- {
- return a[col] - b[col];
- }
- });
- this.data = new Array('9.0','10.1','10.2 Beta 1','9.0','11.0 Beta 1');
- '9.0','11.0 Beta 1','9.0','10.1',...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement