NetBeans jQuery plugin code completion

前端 未结 2 411
忘掉有多难
忘掉有多难 2020-12-30 07:38

I\'m using NetBeans for PHP. When I edit a .js file, it gives me JavaScript code completion. How can I get it to also give me jQuery code completion?

NetBeans 6.9 co

2条回答
  •  生来不讨喜
    2020-12-30 07:39

    I was having the same problem. I have Netbeans 7.2.1 under linux (in an Oracle VirtualBox).

    • I had copied the jquery library 1.10.2 (not minified) into my own project
    • I had added the path into the Project Properties > PHP Include path
    • I still had no auto-complete

    I found a solution based on How to include js file in another js file? I type out the following in the header:

    var imported = document.createElement('script');
    imported.src = 'jquery-1.10.2.js'; // I put the jquery library in the same folder
    document.head.appendChild(imported);
    

    Now I get auto-completion!

    enter image description here

提交回复
热议问题