summaryrefslogtreecommitdiff
path: root/sitestatic/archweb.js
diff options
context:
space:
mode:
Diffstat (limited to 'sitestatic/archweb.js')
-rw-r--r--sitestatic/archweb.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js
index 1ddf4ebf..c274a675 100644
--- a/sitestatic/archweb.js
+++ b/sitestatic/archweb.js
@@ -425,3 +425,13 @@ function format_filesize(size, decimals) {
return size.toFixed(decimals) + ' ' + labels[label];
}
+
+/* HTML5 input type and attribute enhancements */
+function modify_attributes(to_change) {
+ /* jQuery doesn't let us change the 'type' attribute directly due to IE
+ woes, so instead we can clone and replace, setting the type. */
+ $.each(to_change, function(id, attrs) {
+ var obj = $(id);
+ obj.replaceWith(obj.clone().attr(attrs));
+ });
+}