During the running of my website i create new divs using jquery with class "a". I have defined a click() function for "a" class as follows:
$(document).ready(function() {
$(".a").click(function(){
$(".a").hide();
});
});
Problem is that the new divs created with the same class do not call this function when clicked. Other divs with "a" class which are there at the beginning do. What am I doing wrong?