Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7618975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:32:33+00:00 2026-05-31T03:32:33+00:00

Tools: Visual Studio 2010 I’m trying to learn jQuery, but I cant make this

  • 0

Tools: Visual Studio 2010

I’m trying to learn jQuery, but I cant make this example work even after trying for 2 hours. I know it’s quite simple but I don’t know what I’m missing.

JQuery is defined here, inside the <head> tag:

<head runat="server">
<title></title>
<script src="Scripts/jquery-1.7.1-vsdoc.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("button").click(function () {
            $("#divTest1").hide();
            $("p").hide();
        });
    });
</script>
</head>

<body>
<form id="form1" runat="server">
<div>
    <div id="divTest1">
        Itz too much I cant make it work...!
    </div>
    <h2>
        This is a heading</h2>
    <p>
        This is a paragraph.</p>
    <p>
        This is another paragraph.</p>
    <button>
        Click me</button>
</div>
</form>
</body>

Updates:

  • I have tried this
    $(document).ready(function () { alert(“Hello”); });
    And added breakpoint in firebug/Script,after page load firebug got into the jquery library and the went out of it,but it didn’t showed any popup

  • I just changed from “jquery-1.7.1-vsdoc.js” to this “jquery-1.7.1.js” and used simple script to check if itz working $(document).ready( function(){ alert("Hello"); } ); ,jquery is working now.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:32:34+00:00Added an answer on May 31, 2026 at 3:32 am

    As pointed out by Matt Grande, you’re not actually including the jQuery library in your page. You need to add the following to the head:

    <script src="Scripts/jquery-1.7.1.js" type="text/javascript"></script>
    

    The vsdoc version is just to add Intellisense support.

    Also, using e.preventDefault() is preferred over returning false;

    $(document).ready(function () {
        $("button").click(function (e) {
            e.preventDefault();
            $("#divTest1").hide();
            $("p").hide();
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just successfully installed Silverlight 4 tools for visual studio 2010. But I can't
Visual Studio 2010 offers a lot of comfortable tools for unit testing via its
Background: I am using the deployment tools in Visual Studio 2010. I right clicked
When I attempt to use the above two tools together with Visual Studio 2010,
In Visual Studio 2010, under Tools -> Options -> Text Editor -> HTML ->
While installing Visual Studio 2010 Service Pack 1, I am getting this error: Installation
Today after installing extensions (e.g. Power tools) to my Visual Studio 2010 I have
I'm using Visual Studio 2010, C++. What I'm trying to do is retrieve pixel
Visual Studio 2010, C#, ASP.NET & SQL Server 2008 are my main development tools,
With the general public release of Visual Studio 2010 Beta 2 today, this latest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.