3

Possible Duplicate:
NetBeans jQuery plugin code completion

I downloaded the latest Netbeans, placed the following codes but the intellisense is not working.

<script type="text/javascript" src="js/jQuery.js"></script>

<script type="text/javascript">           
    $(document).ready(function() {
        $("a").click(function() {
            alert("Hello world!");
        });
    });
</script>
Community
  • 1
  • 1
BlackFire27
  • 1,470
  • 5
  • 21
  • 32

1 Answers1

5

I just found this link and should help you out.

Follow these steps

  • In your project folder, create a folder named js, and add it to your project.

  • Locate the jQuery library that you downloaded onto your computer. Copy the file to this js folder

Further more, it says to trigger the intellisense include the library as such

<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
                                         <!-- ^ Be sure to include the version number -->
<script type="text/javascript">
     // Try it inside here and it should work
</script>

The display of intellisense

Starx
  • 77,474
  • 47
  • 185
  • 261
  • Are you sure it is netbeans..I have no javascript libraries in properties – BlackFire27 Mar 19 '12 at 12:58
  • yeah..i have it jquery works..but no intellisense. I have js/jquery.js under my project – BlackFire27 Mar 19 '12 at 13:02
  • @BlackFire27, Check the update, thats all i can do right now – Starx Mar 19 '12 at 13:04
  • @BlackFire27k, I will vote this question up, may be you will better answers, but this is what generally works for me. – Starx Mar 19 '12 at 13:07
  • I got what the problem was..it was the name of the file..jquery-1.7.1.. why yours is 1.4.2 ?!?!.. also all the functions have a line marked over them..why is that? – BlackFire27 Mar 19 '12 at 13:13
  • @BlackFire27, I just wrote according to the link, no biggie :). I am happy to got your intellisense working. – Starx Mar 19 '12 at 16:16
  • This is because you are in an HTML file, but when you edit an external js file, again there's no intellisense. – derloopkat Aug 05 '16 at 00:51