Hi there,
I am having some problem understanding an event in jquery.
Given the following example http://api.jquery.com/event.pageY/, I don't quite understand what 'e' is and what it does. The rest of the code is kinda clear, it basically gets the coordinates but I don't understand what is the function of 'e' and where it comes from because it doesn't seem to have been declared anywhere, so it is a parameter holding what?
Any simple suggestion?!
thanks
Violet_82 89 Posting Whiz in Training
Recommended Answers
Jump to PostHi Violet,
e
is a formal variable of the callback function passed to.bind
.$(document).bind('mousemove',function([B]e[/B]){ $("#log").text("e.pageX: " + e.pageX + ", e.pageY: " + e.pageY); });
e
seemingly arises out of nowhere but the truth is actually very simple. The callback function …
Jump to PostHere you see there is no
bind()
just the callback function (which I didn't know it was a callback function - how do I determine that a function is a callback function by the way?). The tutor didn't really explain where that 'e' came from so I went onto …
All 8 Replies
Airshow 416 WiFi Lounge Lizard Team Colleague
MartinRinehart 0 Junior Poster in Training
Violet_82 89 Posting Whiz in Training
Airshow 416 WiFi Lounge Lizard Team Colleague
Violet_82 89 Posting Whiz in Training
MartinRinehart 0 Junior Poster in Training
Airshow 416 WiFi Lounge Lizard Team Colleague
Violet_82 89 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.