Title: WordPress 4.5 &#8211; Uncaught Error: Syntax error, unrecognized expression: a[href*=#
Last modified: August 31, 2016

---

# WordPress 4.5 – Uncaught Error: Syntax error, unrecognized expression: a[href*=#

 *  Plugin Author [YITHEMES](https://wordpress.org/support/users/yithemes/)
 * (@yithemes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/wordpress-45-uncaught-error-syntax-error-unrecognized-expression-ahref/)
 * **Don’t Panic!
    
   
    Before you go any further, make sure you’ve updated your plugins
   and themes to the latest versions, clear your browser’s cache and cookies and
   re-log into your WordPress dashboard.
 * **Uncaught Error: Syntax error, unrecognized expression: a[href\*=#]:not([href
   =#])**
 * After upgrading to WordPress 4.5, an error like the above one could appear in
   many themes, especially in ThemeForest themes. If you are using a theme purchased
   on ThemeForest, please, contact your theme author and ask for an update that 
   fixes any instances of the jQuery problem as listed below.
 * Adding double quote marks before and after the hash symbol (#) will fix it.
 * Change this:
 * $( ‘a[href*=#]:not([href=#])’ ).click( function() {
 * To this:
 * $( ‘a[href*=”#”]:not([href=”#”])’ ).click( function() {
 * Until your theme developers release a fixed version, you can add the following
   code snippet into your theme functions.php file, to temporarily solve the problem:
 *     ```
       add_action( 'wp_enqueue_scripts', 'load_old_jquery_fix', 100 );
   
       function load_old_jquery_fix() {
           if ( ! is_admin() ) {
               wp_deregister_script( 'jquery' );
               wp_register_script( 'jquery', ( "//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" ), false, '1.11.3' );
               wp_enqueue_script( 'jquery' );
           }
       }
       ```
   
 * [https://wordpress.org/plugins/yith-woocommerce-product-slider-carousel/](https://wordpress.org/plugins/yith-woocommerce-product-slider-carousel/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [morgao](https://wordpress.org/support/users/redb68/)
 * (@redb68)
 * [10 years ago](https://wordpress.org/support/topic/wordpress-45-uncaught-error-syntax-error-unrecognized-expression-ahref/#post-7298638)
 * Many thanks its work like a charm
 *  [vinniedauer](https://wordpress.org/support/users/vinniedauer/)
 * (@vinniedauer)
 * [10 years ago](https://wordpress.org/support/topic/wordpress-45-uncaught-error-syntax-error-unrecognized-expression-ahref/#post-7298643)
 * Very helpful – many thanks!
 *  [gabusingh](https://wordpress.org/support/users/gabusingh/)
 * (@gabusingh)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/wordpress-45-uncaught-error-syntax-error-unrecognized-expression-ahref/#post-7298654)
 * Great! it works perfectly!
 * You’ve saved me a lot of time!
 *  [meeshh](https://wordpress.org/support/users/meeshh/)
 * (@meeshh)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/wordpress-45-uncaught-error-syntax-error-unrecognized-expression-ahref/#post-8198009)
 * hello!
 * where is the following located?
 *     ```
       Change this:
   
       $( ‘a[href*=#]:not([href=#])’ ).click( function() {
   
       To this:
   
       $( ‘a[href*=”#”]:not([href=”#”])’ ).click( function() {
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WordPress 4.5 – Uncaught Error: Syntax error, unrecognized expression:
a[href*=#’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-product-slider-carousel/assets/icon.svg?
   rev=3059840)
 * [YITH WooCommerce Product Slider Carousel](https://wordpress.org/plugins/yith-woocommerce-product-slider-carousel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-product-slider-carousel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-product-slider-carousel/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-product-slider-carousel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-product-slider-carousel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-product-slider-carousel/reviews/)

 * 4 replies
 * 5 participants
 * Last reply from: [meeshh](https://wordpress.org/support/users/meeshh/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/wordpress-45-uncaught-error-syntax-error-unrecognized-expression-ahref/#post-8198009)
 * Status: not resolved