Replace all instances of .click() with .trigger("click")