Added event for customization and removed jquery dependency