Created
April 17, 2010 22:56
-
-
Save deepakjois/369878 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 4e65589665eb91964eca0cf90fd7469dcdc566e7 Mon Sep 17 00:00:00 2001 | |
From: Deepak Jois <[email protected]> | |
Date: Sat, 17 Apr 2010 15:50:25 -0700 | |
Subject: [PATCH] Added script to make rectangles consistent | |
--- | |
js/script.js | 25 ++++++++++++++++++++++++- | |
1 files changed, 24 insertions(+), 1 deletions(-) | |
diff --git a/js/script.js b/js/script.js | |
index 7fea18c..ae58877 100644 | |
--- a/js/script.js | |
+++ b/js/script.js | |
@@ -20,4 +20,27 @@ jQuery(document).bind('DOMMouseScroll mousewheel', function(e, delta) { | |
e.preventDefault(); | |
-}) | |
\ No newline at end of file | |
+}) | |
+ | |
+jQuery(document).ready(function(){ | |
+ var desiredOrder = function() { | |
+ var desired = ["ch","sa","op","ff37","ff35","ie9", "ie8","ie7"]; | |
+ for(var i=0;i<desired.length;i++) { | |
+ if (desired[i] == this) { | |
+ return i; | |
+ } | |
+ } | |
+ return 20; | |
+ } | |
+ | |
+ for(var i=1; i<29;i++) { | |
+ var node = jQuery(".ray-"+i); | |
+ var text = node.children("i"); | |
+ | |
+ node.children("b").sort(function(el) { | |
+ return desiredOrder(el.className); | |
+ }).appendTo(node.empty()); | |
+ | |
+ text.appendTo(node); | |
+ } | |
+}); | |
\ No newline at end of file | |
-- | |
1.7.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment