Jquery is a small light-weight and fast library. it is a cross-platform and support different type of browser. it is also referred as write less do more words.
in JavaScript accept the more code but in JQuery accept the less code as compare to JavaScript. This library used for making dynamic page in website.
JQuery is fast as compare to JavaScript. The JQuery used for slide, toggle, hide, show elements in web pages.
- JQuery is a small, fast and lightweight JavaScript library.
- JQuery is platform-independent.
- JQuery means 'write less do more
Example:
<!DOCTYPE html>
<html>
<head>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
<script>
$(document).ready(function(){
$('p').click(function(){
$(this).hide();
});
});
</script>
<style>
p{
background-color: yellow;
}
</style>
</head>
<body>
<p>Click me for hiding the data </p>
<p>Click me again </p>
<p>Click me again and again </p>
</body>
</html>
Output :