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 PostLet's have an example.
function double( x ) { return 2 * x; } // 'x' is a placeholder, waiting for a value y = double( 23 ); // y === 46
When you put the 'double()' function into service, its parameter, 'x', is given a value. …
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.