click() jQuery Method

While this tutorial has content that we believe is of great benefit to our community, we have not yet tested or edited it to ensure you have an error-free learning experience. It's on our list, and we're working on it! You can help us out by using the "report an issue" button at the bottom of the tutorial.

Have a say on what happens when users click stuff on your site:

$('#my_picture').click(function() {
  // Do stuff

Trigger a Click

You can also use the same method to trigger the click event on selected elements:

Creative Commons License