Title: Javascript syntax errors &#8211; need two semicolons
Last modified: July 14, 2017

---

# Javascript syntax errors – need two semicolons

 *  [sabalaskey](https://wordpress.org/support/users/sabalaskey/)
 * (@sabalaskey)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/javascript-syntax-errors-need-two-semicolons/)
 * In the includes/js/scripts.js there are two syntax errors because of missing 
   semicolons. Here is the section of code with the fix indicated. Because of the
   new lines, the loose interpretation of browsers works, but when you minify the
   code it breaks. jsl (js lint) also finds the errors.
 *     ```
       wpcf7.notValidTip = function( target, message ) {
       	var $target = $( target );
       	$( '.wpcf7-not-valid-tip', $target ).remove();
       	$( '<span role="alert" class="wpcf7-not-valid-tip"></span>' )
       		.text( message ).appendTo( $target );
   
       	if ( $target.is( '.use-floating-validation-tip *' ) ) {
       		var fadeOut = function( target ) {
       			$( target ).not( ':hidden' ).animate( {
       				opacity: 0
       			}, 'fast', function() {
       				$( this ).css( { 'z-index': -100 } );
       			} );
       		}; // **added missing semicolon here**
   
       		$target.on( 'mouseover', '.wpcf7-not-valid-tip', function() {
       			fadeOut( this );
       		} );
   
       		$target.on( 'focus', ':input', function() {
       			fadeOut( $( '.wpcf7-not-valid-tip', $target ) );
       		} );
       	}
       }; // **added missing semicolon here**
       ```
   

The topic ‘Javascript syntax errors – need two semicolons’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 0 replies
 * 1 participant
 * Last reply from: [sabalaskey](https://wordpress.org/support/users/sabalaskey/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/javascript-syntax-errors-need-two-semicolons/)
 * Status: not resolved