Hey, If i were you and this is not working - i'd try to call the .trigger('click') on the actual generated Close button with a selector..
so it would probally be something like
$('#duplicateDataMessage button.close').trigger('click');
else maybe just .hide() it.. :/