Define JQuery on fly

by Bhimu Hanagandi

HTML

<div id="holder">
    <button id='first'>first</button>
    <div id="bulder">
    </div>
</div>

JavaScript

$('#first').click(function () {
    alert('first click');
    $('#bulder').html("<input id='second' type='file' name='pic' accept='image/*'>");
    $('#second').click(function () {
        alert('second click');
    });
});