Prevent jumping to the top on an event

Prevent jumping to the top on an event

Hello,

I am a little stuck on a problem and hope that someone can help me a little. I want to prevent that the browser jumps to the top on an event. I know that I could return false to stop this behavior but the element has more then one event. If I return false on the first event it stops every other event after the first. How can I solve this?

  1. function managefocus(){
  2.   //return false here stops the keydown event
  3.   return false;
  4. }
  5. $('#test').keyup(managekeyup);
  6. $('#test').keydown(managekeydown);
  7. $('#test').blur(manageblur);
  8. $('#test').focus(managefocus);