Skip to content

Instantly share code, notes, and snippets.

@bittersweetryan
Created May 2, 2013 19:15
Show Gist options
  • Save bittersweetryan/5504623 to your computer and use it in GitHub Desktop.
Save bittersweetryan/5504623 to your computer and use it in GitHub Desktop.
javascript:(function(){function e(){var b="";return d.each(function(a,c){b+=$(c).get(0).outerHTML}),b}function f(a){var b=a.text().split(" ");return b[b.length-1]}var d,a=$("#svPortal"),b=a.find("dl");document.createDocumentFragment(),d=b.sort(function(a,b){var c=$(a).find(".portalTitle>a"),d=$(b).find(".portalTitle>a");return c=f(c),d=f(d),console.log(c,d),d>c?-1:c>d?1:0}),a.html(e(d))})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment