JQuery Events

Date Published: 10/05/2020Published By: JaiSchool

Jquery events are used to perform special actions on the selected elements in jquery. There are three types of events in Jquery, we can take in use which are following-

  1. Primary Event
  2. Secondary Event
  3. Action Events

#1. Primary Event

There is only one primary event in Jquery, called ready(). We define an anonymous function in the ready() event.

Whole Jquery code is written in the anonymous function, defined in the ready() event.

<body>
<script>
	$(document).ready(function(){
		window.alert("Jaischool");
	});
</script>
</body>

#2. Secondary Event

It contains so many events like mouse events, keyboard events, form events & document or window events related events.

#2.1 Mouse Events in Jquery

Mouse EventsExample
click()See Example
dblclick()See Example
mouseenter()See example
mouseleave()See example

#2.2 Keyboard Events in Jquery

Keyboard EventsExample
keypress()Read More
keydown()Read More
keyup()Read More

#2.3 Form Events in Jquery

Form EventsForm Event Example
submit()Submit() event example
change()change() event example
focus()focus() event example
blur()blur() event example

#2.3 Document or Window Events in Jquery

Document/window EventsExample
load()load() Event Example
unload()unload() Event Example
resize()resize() Event Example
scroll()scroll() Event Example

#3. Action Events in Jquery

S.N.Action EventsExample
1.hide(speed,callback)Example
2.show()Example
3.toggle()Example
4.fadeIn()Example
5.fadeOut()Example
6.fadeTo()Example
7.fadeToggle()Example
8.slideDown()Example
9slideUp()Example
10.slideToggle()Example

Publish A Comment

Leave a Reply

Your email address will not be published.