And test whether using the jQuery click function performs better than the current snippet. Some references: https://api.jquery.com/click https://api.jquery.com/trigger/