js functionlity for events list