Avatar of kmcbrearty
kmcbrearty
Flag for United States of America asked on

jQuery Intellisense in Visual Studio 2010

I downloaded the files for the latest version of jQuery:

jquery-1.7.2-vsdoc.js
jquery-1.7.2.js
jquery-1.7.2.min.js

I have tried methods from several different articles that I have read to attempt to get intellisense to work but no matter what I do it will not work.  I have tried it in a standard page as well as a master page without any luck. All three files are located in a "js" folder.  The code that I am currently working with is:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <!-- insert the script to reference jQuery here -->      
      <script src="../js/jquery-1.7.2.js" type="text/javascript"></script>
      <!-- insert the script to display the Hello World message here -->
      <script type="text/javascript">
          $('document').ready(function () {
              alert('Hello World!');
          });
      </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    </div>
    </form>
</body>
</html>

Open in new window

jQuery.NET Programming

Avatar of undefined
Last Comment
kmcbrearty

8/22/2022 - Mon
Jon Norman

the $('document') should be $(document):

$(document).ready(function () {
    alert('Hello World!');
});

Open in new window


if that still doesn't work, do you have any errors in the error console?

if still no joy try using the following source of jQuery
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js">

if that still doesn't work try:

<script type="text/javascript">
  alert("jQuery: " + typeof(jQuery)+"\n$(document): " + typeof($(document)));
    $(document).ready(function () {
      alert('Hello World!');
     });
</script>

Open in new window

and let me know what the alerts say
kmcbrearty

ASKER
I do not have a problem getting jQuery to work on the page.  My issues is that I can not get intellisense to work as I try to use it.  

As for the alert it states "jQuery: function $(document): object".
ASKER CERTIFIED SOLUTION
kmcbrearty

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
kmcbrearty

ASKER
These were the steps that I took to solve the problem.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck