Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting code hints to work for external JavaScript file (.js)

I am wondering how I can import jquery into a .js file. I want to be able to use codehints (intellinse) but given this is a separate file, I cannot do that. Maybe I don't have to import, but is there any way to get

$().[hint]

to show up inside a standalone .js file?

like image 601
Serguei Fedorov Avatar asked Feb 23 '26 12:02

Serguei Fedorov


1 Answers

Put this at the beginning of your js file

/// <reference path="/js/jquery.js" />
like image 65
Charlie Avatar answered Feb 25 '26 03:02

Charlie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!