kartik-v / yii2-widget-affix

A scrollspy and affixed enhanced navigation to highlight page sections (sub repo split from yii2-widgets)
Other
15 stars 4 forks source link

Syntax error with jQuery versions 1.12, 2.2, 3 #3

Open drtsb opened 7 years ago

drtsb commented 7 years ago

I've got the following error:

Syntax error, unrecognized expression: .kv-sidebar [href=#] Line 28 at /vendor/kartik-v/yii2-widget-affix/assets/js/affix.js

Comment on stackoverflow helped to identify the problem: '#' symbol in a selector should be quoted. http://stackoverflow.com/questions/38415960/why-cant-jquery-3-identify-the-character-in-an-attribute-selector

So I've changed the selector to $('.kv-sidebar [href="#"]') and it works well now.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/42734901-syntax-error-with-jquery-versions-1-12-2-2-3?utm_campaign=plugin&utm_content=tracker%2F8187901&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F8187901&utm_medium=issues&utm_source=github).
brucebnu commented 5 years ago

I have changed that according to drtsb, it works well now.

I hope kartik-v to update /vendor/kartik-v/yii2-widget-affix/assets/js/affix.js