A Href Error A
Contents |
Syntax error, unrecognized expression: a[href*=# WordPress 4.5 - Uncaught Error: Syntax error, unrecognized expression: a[href*=# YITHEMES @yithemes 5 months, 1 week uncaught error syntax error unrecognized expression jquery href ago Don't Panic! Before you go any further, make sure
Wordpress Uncaught Error: Syntax Error, Unrecognized Expression: A[href*=#]:not([href=#])
you've updated your plugins and themes to the latest versions, clear your browser's cache and cookies
Error: Syntax Error, Unrecognized Expression: [href=#] Wordpress
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
Uncaught Error: Syntax Error, Unrecognized Expression: [href=#] Wordpress
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 avada uncaught error: syntax error, unrecognized expression: [href=#] 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/ Viewing 4 replies - 1 through 4 (of 4 total) redb68 @redb68 4 months, 2 weeks ago Many thanks its work like a charm vinniedauer @vinniedauer 3 months, 3 weeks ago Very helpful - many thanks! gabusingh @gabusingh 1 month, 3 weeks ago Great! it works perfectly! You've saved me a lot of time! meeshh @meeshh 1 week, 3 days ago hello! where is the following located? Change this: $( ‘a[href*=#]:not([href=#])’ ).click( function() { To this: $( ‘a[href*=”#”]:not([
Error WP 4.5 and jQuery Syntax Error pixelborder @pixelborder 5 months, 2 weeks ago Hi, So we've just updated to 4.5 and we seem to be receiving a syntax error with jQuery which has completely stripped the website of its navigation bar, among jquery.js?ver=1.12.3:2 uncaught error: syntax error, unrecognized expression: [href=#] other things. I've read around that it's likely caused by a plugin placing jQuery in a href*=# not( href=# ) unrecognized the footer, but to my knowledge we've not got a plugin of that nature installed on the website. I'm a little lost error: syntax error, unrecognized expression: [href=#] avada with this and am hoping somebody might know what's caused this problem. The error we're receiving is: Uncaught Error: Syntax error, unrecognized expression: a[href*=#]:not([href=#]) and the URL is http://www.claremontwealth.com If anyone could point me in the https://wordpress.org/support/topic/wordpress-45-uncaught-error-syntax-error-unrecognized-expression-ahref/ right direction I'd be grateful. Thanks! Viewing 13 replies - 1 through 13 (of 13 total) remowebdesigns @remowebdesigns 5 months, 2 weeks ago I'm getting the same error… I think it's possibly because it's updated the bundled jQuery version from 1.11.3 to 1.12.2 Might be worth disabling the bundled version an using a standalone version with your theme pixelborder @pixelborder 5 months, 2 weeks ago That worked perfectly, thank you! Do you https://wordpress.org/support/topic/wp-45-and-jquery-syntax-error/ think this is something that will likely get rectified as WordPress become aware of the issue? Moderator Marius L. J. (Clorith) @clorith 5 months, 2 weeks ago Hi, This is not a WordPress problem, but a theme or plugin incorrectly using JavaScript code, the newer versions of jQuery are just better at detecting incorrect code and erroring out about it. It is highly recommended -not- to override the core jQuery version as plugins and themes rely on this to be a known value. Unfortunately it's hard for us to pinpoint if it's a theme or plugin causing the problem if you've already overwritten the jQuery versions. 2012cst @2012cst 5 months, 2 weeks ago Perfect Buddy!! Thanks for the code. 🙂 pixelborder @pixelborder 5 months, 2 weeks ago Thank you Marius, I think I follow. So it's more likely a result of a plugin or theme having been unprepared for the 4.5 update? I suspect it has a lot to do with our theme (Divi) needing an update. We're waiting on authorisation to upgrade it. I'll remove the above code when the theme is updated and hopefully that will fix the issue properly. Moderator Marius L. J. (Clorith) @clorith 5 months, 2 weeks ago @pixelborder Divi is known to be incompatible, yes, our Master List (https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list) contain
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more http://stackoverflow.com/questions/29060863/syntax-error-unrecognized-expression-ahref-http-localhost8885 about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Syntax error, unrecognized expression a[href^=http://localhost:8885] up vote 0 down vote favorite The console gives me syntax error while get site url and apply background color to all syntax error anchor tag that start with siteURL. var siteURL = "http://" + top.location.host.toString(); $('a[href^=' + siteURL + ']').css("background-color", "yellow"); Thanks for your help jquery wordpress share|improve this question asked Mar 15 '15 at 13:00 Amit Mishra 181111 2 Try $('a[href^="' + siteURL + '"]').css("background-color", "yellow"); –Pranav C Balan Mar 15 '15 at 13:04 Thanks #Pranav C Balan it work fine –Amit Mishra Mar 15 '15 at 13:05 Glad to help you..... –Pranav C error: syntax error, Balan Mar 15 '15 at 13:06 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote You're missing double quotes around the URL. Change: $('a[href^=' + siteURL + ']').css("background-color", "yellow"); To: $('a[href^="' + siteURL + '"]').css("background-color", "yellow"); share|improve this answer answered Mar 15 '15 at 16:06 Nathan Dawson 7,37431129 Thanks for help #Nathan –Amit Mishra Mar 15 '15 at 16:44 add a comment| up vote 1 down vote Just replace $('a[href^=' + siteURL + ']') with $('a[href^="' + siteURL + '"]'). share|improve this answer edited Mar 15 '15 at 18:06 answered Mar 15 '15 at 13:04 hamed 3,74021538 You have correctly identified the problem, the missing double quotes, but you've also removed the ^ character. ^ is used to select anchor tags whose href attribute begins with the URL instead of matching the URL completely. –Nathan Dawson Mar 15 '15 at 16:08 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged jquery wordpress or ask your own question. asked 1 year ago viewed 4922