Events in Javascript | chai aur #javascript

preview_player
Показать описание
#javascript #hindi
Sara code yaha milta h

Instagram pe yaha paaye jaate h:
Рекомендации по теме
Комментарии
Автор

Here’s a breakdown of the terms you've mentioned, commonly used in JavaScript, especially in event handling:

1.type:

This property returns the type of event (e.g., click, keydown, mouseover).
Example: event.type will return 'click' if a click event occurred.

2.timestamp:

This property returns the time (in milliseconds) at which the event was created. It helps in tracking when an event occurred.
Example: event.timestamp could return 1626873245321.

3.defaultPrevented:

A boolean property that indicates whether the event's default behavior has been prevented.
Example: event.defaultPrevented returns true if event.preventDefault() has been called to prevent the default action.

4.target:

This property returns a reference to the element that triggered the event (the originating element).
Example: event.target could refer to a button if that button was clicked.

5.toElement (Deprecated):

This property is used during a mouseover or mouseout event and refers to the element the pointer is moving to.
Example: event.toElement during a mouseout event tells which element the mouse is moving toward.

6.srcElement (Deprecated):

Similar to target, it returns the element that initiated the event. It's the older version of target but still supported in some browsers.
Example: event.srcElement.

7.currentTarget:

This returns the element that is currently handling the event. It can differ from target if event delegation is used.
Example: event.currentTarget could be the parent element if event delegation is used, even if a child element triggered the event.

8.clientX & clientY:

These properties return the horizontal (clientX) and vertical (clientY) coordinates of the mouse pointer relative to the visible part of the web page (the viewport).
Example: event.clientX returns the X-coordinate, and event.clientY returns the Y-coordinate.

9.screenX & screenY:

These properties return the horizontal (screenX) and vertical (screenY) coordinates of the mouse pointer relative to the user's screen.
Example: event.screenX gives the X-coordinate on the screen.

10.altKey, ctrlKey, shiftKey:

These boolean properties indicate whether the Alt, Ctrl, or Shift key was pressed during the event.
Example: event.altKey will return true if the Alt key was pressed during a click or keyboard event.

11.keyCode (Deprecated):

This property returns the numeric code of the key pressed. It's deprecated in favor of event.code or event.key.
Example: event.keyCode could return 13 for the Enter key.

These properties help track various aspects of user interactions with the page, such as mouse clicks, key presses, and the specific elements involved in those interactions.

IqraMubeen.sheikh
Автор

As a beginner you may not realize how good this series and every video is, by far the best playlist 🙏🙏

Aniket_
Автор

One of the best video I've ever seen on events. Thanks for giving us immense knowledge. I'm a software engineer but to be honest now I got to know in detail about Bubbling n capturing

vrajverma
Автор

eventPropogation, bubble, and capturing is easy to understand after watching this series .
Thank you sir❤❤

jayramkumar
Автор

Finally understood the events ... mind-blowing lecture series

heyMonikaa
Автор

Thank you, for this series. This Javascript series is one of the best on YouTube

vipankumar
Автор

Deeply understood about events, no one teaches and explains the way u do sir, Thank You So

sauravjha
Автор

01:51 Introduction to events in JavaScript
05:37 Events in JavaScript are invoked on specific activities such as mouse click or key press.
07:29 The three approaches discussed are: 1) Using the current approach reduces code. 2) The second approach involves selecting elements by ID and adding an onClick event. 3) The best approach is using event listeners for more features.
11:08 Different approaches to handling click events in JavaScript.
13:08 Events in JavaScript provide detailed information about user interactions.
16:46 The video discusses the events in JavaScript and the use of Alt key
18:26 Event propagation in JavaScript
22:02 By using the Stop Propagation method, you can prevent bubbling of events.
23:43 Using preventDefault() to change the default behavior of an event
27:22 Creating an event to make an image disappear when clicked
29:00 Using event listeners to track click events in JavaScript
32:23 Removing elements in JavaScript using the removeChild method.
34:18 Understanding event propagation and bubbling in JavaScript

BalajeeSingh-ovmv
Автор

I've watched many tutorials on EventListeners but Bubbling and Capturing of Event was what i heard for the first time...

Shams_Tabrezii
Автор

great value addition for JavaScript Community. Thank YOU ❤

muhammadahmedsiddiqui
Автор

"Chai and Code, your coverage of JavaScript events is pure gold! 🌟 I've learned so much from this series, and it's an absolute gem for both me and fellow JavaScript enthusiasts. Thanks for making learning so enjoyable! 👏🚀"

sachinxblock
Автор

As a beginner you may not realize how good this series and every video is

ankitsainiofficial
Автор

What a I never really understood events correctly until this video. Hitesh Sir you are seriously the best teacher I ever came across..💯❤‍🔥🔥🔥🔥🔥

varuntadpatri
Автор

Audio quality, Video quality, Screen recording, Javascript Classes in hindi are a unique and are the best in your channel.

saragadamsuresh
Автор

Mind blowing sir kya padhate ho Apke charche har dwarpe salam he apko

darshandesale
Автор

Thanks Sir for this amazing teaching and mini project .

Alok.
Автор

I find it difficult to understand event propagation properly but the way u explained it with the example was wonderful. keep teaching like that .

sunilbohora
Автор

Grateful that people like you doing best kind of social service by helping the learners with top quality content where others are charging for inferior quality. Thank you for your time, efforts and resources you put up for making this happen.

manojk
Автор

really great channel for hindi speakng community, love from maharashtra sir

theyashsawarkar
Автор

22:00 event propagation: false = Bubbling (bottom to top)
true = Capturing (top to bottom)

girdhar