jQuery Events

Click() Events: $(‘li’).click(function(event){ alert(“Hello World”); }); $(‘li’).on(‘click’, function(event){ alert(“Hello World”); }); 2) Hover() Event: $(‘img’).on(‘hover’, function(event){ alert(“Hello World”); }); Document Loading ready() Event: $(document).ready(function(){ $(“button”).click(function(){ alert(“thanks for clicking”); }); }); Browser Events resize() Events: $(window).resize(function(){ alert(“Your Windows Resizing”); }); 2.…

Read MorejQuery Events

jQuery blur() Method

Definition and Usage The blur event occurs when an element loses focus. The blur() method triggers the blur event, or attaches a function to run when a blur event occurs. HTML Code <html> <head> <script src=””></script> <script> $(document).ready(function(){ $(“input”).blur(function(){ alert(“This…

Read MorejQuery blur() Method