i was reading those few lines of code from a javascript(Jquery) file and I was wondering where those arguments “x” and “y” are coming from.Is the scroll event that is taking care peraphs?
$(window).scroll(function(x,y) {
dosomething(withThis);
});
thanks
Luca
P.S. here is the jquery excerpt that made me ask this question Is this an elegant way to make elements fade in while scrolling?
Well, open Firebug console (or web dev. tools) and paste there this code:
After execution and scrolling you’ll see the result (works on sites with jQuery).
As expected, first argument – event object, 2nd and 3rd – undefined;
But, you can trigger events manually, and pass any arguments.
More info here: http://api.jquery.com/trigger/