Attribute selector a[href=#example] no longer working after updating jQuery [duplicate]
问题 This question already has answers here : Why can't jQuery 3 identify the '#' character in an attribute selector? (2 answers) Closed 2 years ago . $('a[href=#InterventionEditDocs]').trigger('click'); This line of code was working for my project perfectly a few days back but after some updates or something it throws an error in the console. I fixed it by adding quotes around the value: $('a[href="#InterventionEditDocs"]').trigger('click'); and it is now working. But why was it working before,