<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.7.1.js'></script>
<script type='text/javascript'>
$(window).load(function(){
$('#thumbContainer').on("click","a", function(){
console.log("will work now");
});
var thumb = $('<a class="tinythumb">thumb</a>');
$("#thumbContainer").append(thumb);
});
</script>
</head>
<body>
<div id="thumbContainer"></div>
</body>
</html>