From: erik Date: Sat, 28 Aug 2010 19:33:29 +0000 (+0000) Subject: (no commit message) X-Git-Tag: wamblee-utils-0.6~20 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=cc19c33d8179c68791c6c49031f2105f355391d8;p=utils --- diff --git a/wicket/components/src/main/resources/org/wamblee/wicket/behavior/wamblee-preselect.js b/wicket/components/src/main/resources/org/wamblee/wicket/behavior/wamblee-preselect.js index c2caa7b8..a53e0dea 100644 --- a/wicket/components/src/main/resources/org/wamblee/wicket/behavior/wamblee-preselect.js +++ b/wicket/components/src/main/resources/org/wamblee/wicket/behavior/wamblee-preselect.js @@ -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);