Hi guys,

Somehow I have some trouble explaining my issue so don't hesitate to ask questions!

I have a table (that I created with a gridview in .net). When I click on a cell with a span tag in it (result of the asp Label), I add with JQuery a textbox with the text that was in the span and hide the span.
For more clarity here's the code :

Code:
$(document).ready(function () {
    $('#myGridView tr:nth-child(n+2) td span').click(function () {
        $(this).after("<input type='text' value='" + $(this).text() + "' id='input_" + $(this).attr("id") + "' />");
        
        $('#input_' + $(this).attr("id")).focus();
        $('#input_' + $(this).attr("id")).width($(this).width());
        $(this).hide();
    });
});
Now if I try to get those created textboxes with $('input') or $('input:text') I get nothing (ut it works on buttons that were loaded with the page).
Like if I try

Code:
$('input').click(function () {
        alert('hi');
    });
Nothing...

Any thoughts ??

EDIT:
Someone explained to that because the inputs are inserted after the second click handler, it doesn't know that they exist. So I just created them from the start with css "display:none" and toggle the css when clicking..