I am adding the element dynamically to a div tag. After that i want to perform click event on this newly added element. But its not working. 

Below is the code. 

```
$(document).ready(function () {
    $('#login-option').click(function () {

        $.ajax({
            url: "http://localhost/cgi-bin/login_form.pl",
            type: "GET",
            dataType: "html",
            //expect html to be returned
            // script call was *not* successful
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                $('div#proper-form').text("responseText: " + XMLHttpRequest.responseText + ", textStatus: " + textStatus + ", errorThrown: " + errorThrown);

                alert("script error");
            },
            // error 

            // script call was successful 
            success: function (response) {
                $("div#proper-form").html('<b id="testid"> testing</b>');
            }
        });

        $('div#proper-form').fadeIn(5000);
        return false;
    });

    $('div#proper-form').on('click', '#testid', function () {
        alert("working as expected");
    });
});

```

New element is added, but click is not working on it. Can please help me in finding what is wrong here.

Any help will be great help.

Thanks