Allow us to access the extra parameters passed along with jquery event

Just re-opening an automatically closed PR #1966, as @Slava asked me to do so. The issue was already mentioned here #1793. Here is a very simple (and probably harmless) fix.