Reputation:
I have a little problem with PhpStorm 2017. I get this error message even if my code is working properly:
I don't know how to deactivate this message. Thank you for your help.
Upvotes: 5
Views: 6034
Reputation: 5041
Try adding jquery as a library in your project. File -> Settings -> Languages & Frameworks -> JavaScript -> Libraries then enable the global jQuery. You might need to restart your IDE.
If that doesn't work you can use the "on" syntax to add the click event handler. http://api.jquery.com/on/
E.G
$('#cookie_btn').click(function (){})
Becomes
$('#cookie_btn').on('click',function (){})
Upvotes: 8