Used jquery for events