I am trying to update my jQuery version from 1.10.2 to 3.6.0. When I use the 3.6.0 version, I get the following error - "Uncaught Error: Syntax error, unrecognized expression: a[href$=]" Even when location.hash has a value, it gives the same error. For example, page.html#ceftin will give the error with a[href$=ceftin] listed in the error. This does not occur with version 1.10.2.
Here is the script where the error occurs:
$(document).ready(function(){
var anchor_hash = location.hash;
var anchor_link = $("a[href$=" + anchor_hash + "]").closest(".gb-div");
var expand_image = $("a[href$=" + anchor_hash + "]").closest(".gb-div").prevAll("li:first");
var close_icon = '<img src="image/gb-close-icon.svg" class="image-expand">';
var anchor_list = $("a[href$=" + anchor_hash + "]").parent();
var original_color = $(anchor_list).css('background-color');
var time = 3500; anchor_link.slideDown(
anchor_link.slideDown(0); expand_image.children(
expand_image.children('.gb-expand').children(".gb-expand-icon").html(close_icon);
All of my other jQuery script works fine with version 3.6.0. Any help would be appreciated.