JQuery guide for beginner’s part 5 – Working with Events | Lessoncup Programming Blog

Sunday, 27 October 2013

JQuery guide for beginner’s part 5 – Working with Events

HI, in previous lesson we worked on HTML Elements and text, now we are going to work on Events, JQuery events are the main method of communication between user and website or web application, User events mostly we use mouse or keyboard and browser events are mainly, DOM events like document.ready, window.onload, and many other events related to DOM elements.


When coding ajax applications, we also have custom jquery ajax events that are dispatched during the process of an ajax request that is ajaxSend, ajaxComplete, ajaxError and some more.

Attaching an event handler to selector 

$(document).ready(function(){

 $(‘p’).click(function(){

alert(‘this is jquery’);

});

});

The above example shows the alert box to click on all paragraph tags

No comments :

Post a Comment

Mohammad Khasim
Blogger | Web Developer
Hyderabad - INDIA
lessoncup@gmail.com

PHP | My SQL | JQUERY
Web Development Tools | CMS | Frameworks | SEO

Get my Latest Lessons