(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Sat, 28 Aug 2010 19:33:29 +0000 (19:33 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Sat, 28 Aug 2010 19:33:29 +0000 (19:33 +0000)
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);