jQuery click event not firing when appending new button
<p>When I click the 'Show' button the show listener is invoked and a new hide button is displayed. But why is the hide button not invoked when I then click 'Hide' ?</p>

<pre><code> $('.myCss').append('&lt;input type="button" class="show" value="Show"/&gt;');

$('.show').on('click', function () {
        console.log('show clicked');
    $('.myCss').append('&lt;input type="button" class="hide" value="Hide"/&gt;');
});

    $('.hide').on('click', function () {
    console.log('hide clicked');
    $('.myCss').append('&lt;input type="button" class="show" value="Show"/&gt;');
    });
</code></pre>
