click on html element except a dynamically created elements?

Viewed 51

I need to trigger click in an html page except a div.but that div is created dynamically after page load.I have tried following code.

$('html').click(function(e) {   

    if(!$(e.target).hasClass('flyoutdiv') ){

    }

}); 

It is working only for element that is not created dynamically. "flyoutdiv" is created dynamically after page load.I need to trigger click in the entire page except that element.is there any solution?

3 Answers
Related