Fixed onclose event

added content option, allows a dom object or a string.