In this post, we will learn some basic usage of jQuery in web development.In modern development, jQuery has become an essential thing.It makes our developing work faster and it is also easy to learn.So Let’s Start.
What Is Jquery?
Benefits of using jQuery:
-Using jquery you can Handle events like Click, hover, change,keyup, etc… and perform some action on it.
-Jquery allows you to make add animation to your page like fade in, fade out, slide in, slide out or you can make custom animation.
-With Jquery you can also make Ajax request without refreshing your whole page.
-And lot more…..
Create an HTML page with its basic structure as follow:
<!DOCTYPE html> <html> <head> <title>jQuery Step-by-step</title> </head> <body> <!-- Content Area--> </body> </html>
Add the element to perform some action on it.we’re going to add two links for enabling and disabling and one button.Add the following code inside the Body tag:
<a href="#" id="next">Disable</a> <button>Register</button> <a href="#" id="prev">Enable</a>
Now we are going to add Jquery Libray.You can add Jquery by Downloading From official site Jquery.com.But in This example we are going to use Google’s copy of Jquery.Add The Following Code Below the Body tag:
Add jquery Script Below it.In Folwing code we are using link id ‘next’ and ‘prev’ to perform task.
Complete Code: Here is the Complete code achieve from the above steps.
So, These are some basic uses of Jquery. Thanks for reading.
Do let me know If you face any difficulties please feel free to comment below we love to help you. if you have any feedback suggestions then please inform us by commenting.