Can you talk about the purpose of use? Why is event.CurrentTarget used? I do not understand the example here. What does it do?
Asked
Active
Viewed 44 times
0
-
becose, you cant got n same elements in dom calling same method, and to know wich of all call method in current instance – Álvaro Touzón Feb 03 '17 at 12:56
-
1If you assign a click handler to multiple elements, or if you do it dynamically, you might want to find out which element was actually clicked inside the handler. As explained you don't usually need it; but in case you bound `this` to another object, you can still get the one that was clicked / triggered / etc. – Feb 03 '17 at 12:58
-
allows you to refer to the element where the event was based rather than, by say, its id or something else. – A. L Feb 03 '17 at 12:58
-
`event.currentTarget` on mouse last action of the element – prasanth Feb 03 '17 at 12:58
-
Log the event object to console and inspect it. Will see it has a lot of different properties – charlietfl Feb 03 '17 at 13:02
-
1It does exactly what it says it does, it's equal to the `this` value of the function, except in some cases, for instance where you specifically set a `this` value with something like `$.proxy`, then `this` will be equal to whatever context you have provided, but `event.currentTarget` will still be the element, or whatever `this` would normally be. – adeneo Feb 03 '17 at 13:02
-
[here](http://stackoverflow.com/questions/24352610/real-life-usages-for-event-currenttarget) might be an answer to your question. – Ritik Saxena Feb 03 '17 at 13:04
-
@ÁlvaroTouzón Hi, ı have reached your question limiT. Would you please give me a positive vote? I have questions to ask – Girl_engineer Feb 23 '17 at 07:52
-
dont understand what you want – Álvaro Touzón Feb 23 '17 at 07:55
-
@ÁlvaroTouzón My question is blocked. Would you vote positive if I ask? – Girl_engineer Feb 23 '17 at 07:56
-
your question is duplicated, and got link to original? – Álvaro Touzón Feb 23 '17 at 07:58
-
http://stackoverflow.com/questions/42243462/alternate-to-imei Would this be a question? @ÁlvaroTouzón – Girl_engineer Feb 23 '17 at 08:00