From: Erik Brakkee Date: Sat, 28 Aug 2010 19:33:29 +0000 (+0000) Subject: (no commit message) X-Git-Tag: wamblee-utils-0.7~58 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=2bb49b8032962ba042c2b83ed913a52b1deca29f;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);