$(document).ready(function(){
var t = $("<div><button class='leaf' id='l2'>Awesome!</button></div>");
$('#l1').click(function(){
$('#num').text("four");
});
$('.oright').click(function(){
$('#num').text("Five");
$('.oright').after(t);
$('.oright').remove();
});
$('#l2').on('click', function(){
$('#num').text("Reset?");
});
});
The #l2 button doesn't have any functionality. I don't see any Syntax error, I looked it up and read that .on('click') was better than .click for dynamic elements, so I changed that but it still doesn't work.