keyup function does not fire after .html()

keyup function does not fire after .html()

Hi all,

I have two function checks keyup and keydown on input fields of a division which are placed in document.ready (please see below)

The problem is these functions fires without any problems on page load. But does not fire after changing the content of the division (for login and logout) using .html() property. 

Anybody have an idea how I can fire these functions after the login/logout process?


Many thanks
telmessos

Function is:

$(document).ready(function() {
    //reset previously set border colors and hide all message on .keyup()
    $("#login_form input").keyup(function() { 
        $("#login_form input").css('border-color',''); 
        $("#result2").slideUp();  
    });
    $("#login_form input").keydown(function(e) { 
    if(e.keyCode == 13){
        login();
        } 
    });
    
});