From ea3aaaafb7dc3a2d8f7cc1c8a5926c48c8a380c0 Mon Sep 17 00:00:00 2001 From: Tatsuya Ono Date: Thu, 4 Feb 2010 22:01:53 +0000 Subject: [PATCH] created min file. set version number 0.3.0 --- compressor_command_note.txt | 1 + jquery.clearableTextField.js | 2 +- jquery.clearableTextField.min.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 compressor_command_note.txt diff --git a/compressor_command_note.txt b/compressor_command_note.txt new file mode 100644 index 0000000..f62551d --- /dev/null +++ b/compressor_command_note.txt @@ -0,0 +1 @@ +java -jar ~/Downloads/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar jquery.clearableTextField.js -o jquery.clearableTextField.min.js \ No newline at end of file diff --git a/jquery.clearableTextField.js b/jquery.clearableTextField.js index b972f90..68cebed 100644 --- a/jquery.clearableTextField.js +++ b/jquery.clearableTextField.js @@ -1,5 +1,5 @@ /* - * Clearable Text Field - jQuery plugin version 0.2.1 + * Clearable Text Field - jQuery plugin version 0.3.0 * Copyright (c) 2009 Tatsuya Ono * * http://github.com/ono/clearable_text_field diff --git a/jquery.clearableTextField.min.js b/jquery.clearableTextField.min.js index 6a74ccc..78995fc 100644 --- a/jquery.clearableTextField.min.js +++ b/jquery.clearableTextField.min.js @@ -1,5 +1,5 @@ /* - * Clearable Text Field - jQuery plugin version 0.2.1 + * Clearable Text Field - jQuery plugin version 0.3.0 * Copyright (c) 2009 Tatsuya Ono * * http://github.com/ono/clearable_text_field @@ -8,4 +8,4 @@ * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ -(function(d){d.fn.clearableTextField=function(){if(d(this).length>0){d(this).bind("keyup change paste cut",e);for(var f=0;f0){b(f)}else{a(f)}}function b(i){if(!i.next().hasClass("text_clear_button")){i.after("
");var f=i.next();var g=f.outerHeight(),k=f.outerHeight();i.css("padding-right",parseInt(i.css("padding-right"))+g+1);i.width(i.width()-g-1);var m=i.position();var j={};j.left=m.left+i.outerWidth(false)-(g+2);var l=Math.round((i.outerHeight(true)-k)/2);j.top=m.top+l;f.css(j);f.click(function(){i.val("");c(i);i.change()})}}function a(h){var f=h.next();if(f.hasClass("text_clear_button")){f.remove();var g=f.width();h.css("padding-right",parseInt(h.css("padding-right"))-g-1);h.width(h.width()+g+1)}}})(jQuery); \ No newline at end of file +(function(d){d.fn.clearableTextField=function(){if(d(this).length>0){d(this).bind("keyup change paste cut",e);for(var f=0;f0){b(f,g)}else{a(f)}}function b(n,l){if(!n.next().hasClass("text_clear_button")){var g=n.wrap('
');n.after("
");var i=n.next();var o=i.outerHeight(),k=i.outerHeight();n.css("padding-right",parseInt(n.css("padding-right"))+o+1);n.width(n.width()-o-1);var m=n.position();var f={};f.left=m.left+n.outerWidth(false)-(o+2);var j=Math.round((n.outerHeight(true)-k)/2);f.top=m.top+j;i.css(f);i.click(function(){n.val("");c(n);n.change()});if(l&&l!=undefined){n.focus()}}}function a(h){var f=h.next();if(f.hasClass("text_clear_button")){f.remove();var g=f.width();h.css("padding-right",parseInt(h.css("padding-right"))-g-1);h.width(h.width()+g+1)}}})(jQuery); \ No newline at end of file