change 'name' to 'site', make label cells same width
[plstackapi.git] / planetstack / core / xoslib / static / js / xoslib / xos-util.js
index 1d135f4..15aa1b0 100644 (file)
@@ -111,3 +111,10 @@ function all_options(selector) {
     });
     return result;
 }
+
+function make_same_width(containerSelector, itemSelector) {
+    var maxWidth = 0;
+    $(containerSelector).find(itemSelector).each( function(index) { maxWidth = Math.max(maxWidth, $(this).width()); });\r
+    console.log(maxWidth);\r
+    $(containerSelector).find(itemSelector).each( function(index) { $(this).width(maxWidth); });
+}