My code is working but i get a console error: Should I ignore it?
Uncaught Error: Syntax error, unrecognized expression: #lips/
URL is
https://allgood.flywheelsites.com/shop/#lips/
Here is my code: the trailing slash was breaking this code but i finally got it working.
var url = window.location.href.repla
ce(/\/$/, '');
var lastPart = url.substr(url.lastIndexOf
('/') + 1);
if (lastPart === "#lips") {
jQuery('input.jet-checkbox
es-list__i
nput').eac
h(function
(){
var catagory_value=jQuery(this
).val();
for (var i=0;i<catagory_value[0].le
ngth;i++) {
if (catagory_value == "129") {
jQuery(this).parent().addC
lass("lips
");
jQuery(window).load(functi
on() {
jQuery('.lips .jet-checkboxes-list__inpu
t').trigge
r('click')
;
});
} } }); }
https://allgood.flywheelsites.com/shop/#lips
Which doesn't cause the error.
»bp