Permalink
Browse files

removed min version

  • Loading branch information...
sagivo committed Jul 18, 2012
1 parent 0a8b2bb commit c50280a9295ccde44542765f3cc3296a5aa7678f
Showing with 3 additions and 34 deletions.
  1. +1 −1 jquery-watermark.js
  2. +2 −2 sample/index.html
  3. +0 −4 sample/jquery-1.7.min.js
  4. +0 −27 sample/jquery-watermark.js
View
@@ -1,5 +1,5 @@
/*! jQuery-water v1.0 created by: Sagiv Ofek */
-$.fn.water = function (params) {
+$.fn.watermark = function (params) {
//default values
var settings = $.extend({
'waterCss': { color: 'Gray' },
View
@@ -18,8 +18,8 @@ <h1>Cool demo</h1>
<input type="text" data-water="enter email" /><br />
</div>
- <script src="jquery-1.7.min.js" type="text/javascript"></script>
- <script src="jquery-watermark.js" type="text/javascript"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
+ <script src="../jquery-watermark.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var params = { activeCss: { color: 'Black' }, waterCss: {color: 'Gray'}};
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,27 +0,0 @@
-/*! jQuery-water v1.0 created by: Sagiv Ofek */
-$.fn.watermark = function (params) {
- //default values
- var settings = $.extend({
- 'waterCss': { color: 'Gray' },
- 'activeCss': { color: 'Black' }
- }, params);
-
- //loop
- $(this).each(function () {
- if ($(this).val().length == 0) {
- $(this).css(settings.waterCss);
- $(this).val($(this).attr("data-water"));
- }
- $(this).unbind("focus").focus(function () {
- if (($(this).val() == $(this).attr("data-water")) || (jQuery.trim($(this).val()).length == 0)) {
- $(this).val("");
- this.style.color = "Black";
- }
- }).blur(function () {
- if (jQuery.trim($(this).val()).length == 0) {
- $(this).val($(this).attr("data-water"));
- $(this).css(settings.waterCss);
- }
- });
- });
-}

0 comments on commit c50280a

Please sign in to comment.