<a href="#" class='gbutton yen_form' rel="overlay-box1">Next</a>
$('yen_form').click(function(){
//some validations done here
$(this).addClass('overlay');
});
$('overlay').click(function(){
//overlay appears
})
First function fires correctly but the second 'overlay' class function does not fired at all. If I added overlay to the anchor it works properly. why???
Can any one solve this or I am doing anything wrong??