(no commit message)
[utils] / wicket / components / src / main / resources / org / wamblee / wicket / behavior / wamblee-preselect.js
index c2caa7b88f148286b5b151fd8c282ec9092e713e..a53e0dea1035cbc3c7b670eb363355a495a94a7d 100644 (file)
@@ -1,13 +1,15 @@
-org.wamblee.preselectSetup = function(id) {
-       var preselect = function(elem) {
-               if (elem.defaultValue == elem.value) {
-                       elem.select();
-               }
-       };
-       // Add focus listeners.
-       $(id).find(":text, textarea").each(function() {
-               $(this).focus(function() {
-                       preselect(this);
-               });
-       })
-}
\ No newline at end of file
+(function($) {
+       org.wamblee.preselectionSetup = function(id) {
+               var preselect = function(elem) {
+                       if (elem.defaultValue == elem.value) {
+                               elem.select();
+                       }
+               };
+               // Add focus listeners.
+               $(id).find(":text, textarea").each(function() {
+                       $(this).focus(function() {
+                               preselect(this);
+                       });
+               })
+       }
+})(jQuery);