By ishaq shinwari
jQuery is a lightweight, "write less, do more", JavaScript library. The purpose of jQuery is to make it much easier to use JavaScript on your website.
Many of the biggest companies on the Web use jQuery, such as: Google Microsoft IBM Netflix
jQuery is a JavaScript Library. jQuery greatly simplifies JavaScript programming. jQuery is easy to learn.
Before you start studying jQuery, you should have a basic knowledge of: HTML CSS JavaScript
$(document).ready(function() { $("p").click(function(){ $(this).hide(); }); If you click on me, I will disappear. Click me away! Click me too! this is just checking p
$(document).ready(function() { $("p").click(function(){ $(this).hide(); }); }); $(this).hide() - hides the current element. $("p").hide() - hides all elements.
$(document).ready(function(){ $("p").dblclick(function(){ $(this).hide(); }); If you double-click on me, I will disappear. Click me away! Click me too!
$(document).ready(function(){ $("p").dblclick(function(){ $(this).hide(); });
$(document).ready(function(){ $("#p1").mouseenter(function(){ alert("You entered p1!"); }); Enter this paragraph.
$(document).ready(function(){ $("#p1").mouseenter(function(){ alert("You entered p1!"); });
$(document).ready(function(){ $("#p1").mouseleave(function(){ alert("Bye! You now leave p1!"); }); This is a paragraph.
$(document).ready(function(){ $("#p1").mouseleave(function(){ alert("Bye! You now leave p1!"); });
$(document).ready(function(){ $("#p1").mousedown(function(){ alert("Mouse down over p1!"); }); This is a paragraph.
$(document).ready(function(){ $("#p1").mousedown(function(){ alert("Mouse down over p1!"); });
$(document).ready(function(){ $("#p1").hover(function(){ alert("You entered p1!"); }, function(){ alert("Bye! You now leave p1!"); }); This is a paragraph.
$(document).ready(function(){ $("#p1").hover(function(){ alert("You entered p1!"); }, function(){ alert("Bye! You now leave p1!"); });
$(document).ready(function(){ $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); }); If you click on the "Hide" button, I will disappear. Hide Show
$(document).ready(function(){ $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); });
$(document).ready(function(){ $("button").click(function(){ $("p").toggle(); }); Toggle This is a paragraph with little content. This is another small paragraph.
$(document).ready(function(){ $("button").click(function(){ $("p").toggle(); });
The End