After update to 1.0.9, I face an error in a Jquery script.
Error is given as:
Uncaught Error: Syntax error, unrecognized expression: a[href*=#]:not([href=#])
I am using theme Antimatter.
I introduced this script from Mediator Theme to makes a curtain effect (arriving on page, there is a picture covering screen and on click on a arrow, this script makes the curtain opens itself on post).
It was working prefectly until update 1.0.9.
Probably the update to JQuery 2.2.0 is related to this, but I don't know ??
I also update skeleton Mediator to check if it would have same problem but it did not make the same result: script in Mediator continued to work fine, while it's exactly same redaction!
I really don't know what to do!
Thank in advance for help.
Tidivoit
Here is the script: (problem is at line 21 $('a[href*=#]:not([href=#])').click(function() {
<script>
(function ($) {
"use strict";
$(document).ready(function(){
var $window = $(window),
$image = $('.curtain-image-image');
$window.on('scroll', function() {
var top = $window.scrollTop();
if (top < 0 || top > 1500) { return; }
$image
.css('transform', 'translate3d(0px, '+top/3+'px, 0px)')
.css('opacity', 1-Math.max(top/700, 0));
});
$window.trigger('scroll');
var height = $('.curtain-image').height();
$('.curtain-content').css('padding-top', height + 'px');
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
&& location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({ scrollTop: target.offset().top }, 500);
return false;
}
}
});