jQuery And Its Basics




jquery is a important factor in designing a web page because it can perform many  functions that it can include animations like slide down, slide up, toogle etc. They contribute more animations than a cascading style sheet.



Syntax:

Basic syntax is: $(selector).action()


$(document).ready(function(){

 // jQuery methods go here...

});


 The jQuery is written inside the script tag but only this function works when we write the Google's on Microsoft's script source code inside the script tag. The cdn of the script tag of Microsoft and Google is is given below:

Google CDN:

<head>
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>

Microsoft CDN:

<head>
<scriptsrc="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js"></script>
</head>

jQuery Syntax

The jQuery syntax is tailor-made for selecting HTML elements and performing some action on the element(s).
Basic syntax is: $(selector).action()
  • A $ sign to define/access jQuery
  • A (selector) to "query (or find)" HTML elements
  • A jQuery action() to be performed on the element(s)
Examples:

$(this).hide() - hides the current element.

$("p").hide() - hides all <p> elements.

$(".test").hide() - hides all elements with class="test".

$("#test").hide() - hides the element with id="test".


Comments

  1. Thank you for sharing this informative post. Looking forward to read more.
    Web Design and Development Company

    ReplyDelete
  2. Thank you for sharing useful information with us. please keep sharing like this.
    And if anyone like to take admission in Dehardun then check this.

    Tula's Institute Best Bsc Agriculture Colleges in Dehradun

    ReplyDelete
  3. very interesting, good job and thanks for sharing such a good blog. Seo Services Delhi

    ReplyDelete
  4. Learn Full Stack Developer Course in Hyderabad from No.1 Full Stack Training Institute. We teach MERN Full Stack, JAVA Full Stack, Python Full Stack courses with Real time Projects. Our Full Stack Developer Course includes basic to advanced level concepts. We have designed our Full Stack Development Course content based on students' requirements to achieve goals. We offer Classroom Full Stack Development training in Hyderabad and Full Stack Development online training by 10+ years Experienced Industry Experts.

    ReplyDelete

Post a Comment

Popular posts from this blog

Node.js Cheat Sheet

Codeigniter ! Simple But Powerful

Bootstrap ? What is it ?