Title: JS Error
Last modified: August 31, 2016

---

# JS Error

 *  Resolved [patrickodacre](https://wordpress.org/support/users/patrickodacre/)
 * (@patrickodacre)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/js-error-35/)
 * Hello folks,
 * Love this plugin.
 * Unfortunately a JS error is causing me some grief by breaking GForms backend 
   gui.
 * Error is showing up here:
 * var tabs = $(“#post-snippets-tabs”).tabs();
 * Error Message in console:
    “Uncaught TypeError: $(…).tabs is not a function”
 * I had a similar error with one of my plugins and using this conditional check
   kept my script off the gforms entries screen:
 *     ```
       if ( ( is_admin() ) && ( ( $this->is_edit_page( 'edit' ) ) || ( $this->is_edit_page() ) || ( $this->is_edit_page( 'new' ) ) ) )
   
                /**
       	 * is_edit_page
       	 * function to check if the current page is a post edit page
       	 *
       	 * @param  string $new_edit what page to check for accepts new - new post page ,edit - edit post page, null for either
       	 *
       	 * @return boolean
       	 */
       	private function is_edit_page( $new_edit = null ) {
       		global $pagenow;
   
       		if ( $new_edit == "edit" ) {
       			return in_array( $pagenow, array( 'post.php', ) );
       		} elseif ( $new_edit == "new" ) //check for new post page
       		{
       			return in_array( $pagenow, array( 'post-new.php' ) );
       		} else //check for either new or edit
       		{
       			return in_array( $pagenow, array( 'post.php', 'post-new.php' ) );
       		}
       	}
       ```
   
 * [https://wordpress.org/plugins/post-snippets/](https://wordpress.org/plugins/post-snippets/)

The topic ‘JS Error’ is closed to new replies.

 * ![](https://ps.w.org/post-snippets/assets/icon-128x128.gif?rev=2545587)
 * [Post Snippets - Custom WordPress Code Snippets Customizer](https://wordpress.org/plugins/post-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/post-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-snippets/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [patrickodacre](https://wordpress.org/support/users/patrickodacre/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/js-error-35/)
 * Status: resolved