Theme-Logo
  •   .Net
    •   C Sharp(C#)
    •   Web API
    •   Micro Services
    •   ASP.Net
    • ASP.Net MVC
    • .Net Core
  •   Database
    • SQL Server
    • Oracle
    • PostgreSQL
  •   jQuery
    • jQuery Tutorials
    • jQuery Plugins
    • jQuery UI
    • More on jquery
  •   Tutorials
    • Microservices Tutorials
    • DotNet Core Tutorials
    • PostgreSql Tutorials

What is jQuery?

As same as open-source software, jQuery acts as the JS library that simplifies the HTML client-side scripting. jQuery synthesizes all problems in JS into a library.

The main purpose of jQuery is to provide an easy way to use JavaScript on your website to make it more interactive and attractive. It is also used to add animation..

Why jQuery?

jQuery is a lightweight, "write less, do more" , JavaScript library. jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code. jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation etc.

Is jQuery is a Programming Language?

jQuery is not a programming language but a well-written JavaScript code. It is used to traverse documents, event handling, Ajax interaction, and Animation.

Why do we use jQuery?

  • It is very easy to learn and use.
  • It is used to develop browser compatible web applications.
  • It improves the performance of an application.
  • It is very fast and extensible.
  • It provides cross-browser support.
  • What is $() in jQuery library?

    The $() function is an alias of jQuery function. It is used to wrap any object into jQuery object which later facilitates you to call the various method defined jQuery object. You can pass a selector string to $() function, and it returns a jQuery object which contains an array of all matched DOM elements.

    How to use jQuery?

    We can use jquery by using two methods:

  • We can download jQuery library on your local machine (click here to download latest version) and include it in your HTML Or Web (aspx/cshtml) File.
  • We can include jQuery library into your HTML code directly from Content Delivery Network (CDN).
  • Examples# By Using jQuery File Local Machine

    <html>
       <head>
          <title>The jQuery Example</title>
          <script type = "text/javascript" src = "/jquery/jquery-2.1.3.min.js">
          </script>
    		
          <script type = "text/javascript">
             $(document).ready(function() {
                document.write("Hello, DotNet Palace!");
             });
          </script>
       </head>
    	
       <body>
          <h1>Hello DotNet Palace</h1>
       </body>
    </html>

    Examples# By Using jQuery File From CDN

    <html>
       <head>
          <title>The jQuery Example</title>
          <script type = "text/javascript" src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
          </script>
    		
          <script type = "text/javascript">
             $(document).ready(function() {
                document.write("Hello, DotNet Palace!");
             });
          </script>
       </head>
    	
       <body>
          <h1>Hello DotNet Palace</h1>
       </body>
    </html>

    Summary

    To summarise, jQuery is a fast, lightweight, feature-rich client-side which uses JavaScript library. Hope you picked up a thing or two.

    Cheers!

    ❮ Previous
    Next ❯

    Trending Post
    Dependency Injection in C#
    Inversion of controls (IoC)
    Design patterns
    Service-Oriented Architecture(SOA)
    Interview Questions and Answers
    What is Request delegate?
    What is Host in ASP.NET Core?
    Describe the Generic Host and Web Host?
    Describe the Servers in ASP.NET Core?
    How to read values from Appsettings.json file?
    How to handle errors in ASP.NET Core?
    About us

    DotNet Palace is a community platform created and maintained by The articles are mainly focused on Microsoft stack technologies like C#, ASP.Net, MVC, .Net Core, SQL Server and Oracle, PostgreSQL, SQLite etc. To improve the site's content you can send your valuable suggestions at info.dotnetpalace@gmail.com

    Quick links
  • SOLID Principles
  • Questions
  • OOPS Principles
  • DotNet Palace Tutorials
  • Privacy Policy
  • Terms and Condition