PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

clear default value

  1. rlpartida
    Member

    I followed the instructions here :

    http://www.gravityhelp.com/clearing-default-form-field-values-with-jquery/

    To clear the defaul values to no avail!

    I appreciate your help. Here is the site:

    http://www.straightforex.com/esp/

    Posted 12 years ago on Monday August 27, 2012 | Permalink
  2. What is this file in reference to: Screenshot

    Posted 12 years ago on Monday August 27, 2012 | Permalink
  3. rlpartida
    Member

    Hey Rob, thanks for your quick answer:

    I added it to the js folder's theme, and it's got this:

    jQuery(document).ready(function() {
    
    	jQuery.fn.cleardefault = function() {
    	return this.focus(function() {
    		if( this.value == this.defaultValue ) {
    			this.value = "";
    		}
    	}).blur(function() {
    		if( !this.value.length ) {
    			this.value = this.defaultValue;
    		}
    	});
    };
    jQuery(".clearit input, .clearit textarea").cleardefault();
    
    });
    Posted 12 years ago on Monday August 27, 2012 | Permalink
  4. The file is not likely named js:gravity.js and is probably not in the root folder of the website. Follow the format of the links to the other scripts, and store your script in the same place and I think you will have it. Your link may look something like this:

    <script type='text/javascript' src='http://www.straightforex.com/blog-de-forex/wp-content/themes/yoo_subway_wp/js/gravity.js'></script>
    Posted 12 years ago on Tuesday August 28, 2012 | Permalink
  5. rlpartida
    Member

    Thank you Chris and Rob for your help...

    The path was wrong as Chris suggested...

    Thanks again!

    Posted 12 years ago on Tuesday August 28, 2012 | Permalink
  6. Cool, glad to help.

    Posted 12 years ago on Tuesday August 28, 2012 | Permalink

This topic has been resolved and has been closed to new replies.