Since your elements are created during run time, they would not available while registering events for them in ready state, so that in this context you have to use event delegation
Try,
$(document).on('click','[class^="div"]',function(){
//your code here.
});
And in the above code, i have used attribute starts with selector, so that you could easily select the elements which have class name starts with div and write the events for the same.