JQuery Events

The quotation marks in the code, should not be curly””, it’s how wordpress formats them.

Here is a complete list of the events.  They allow users to interact with your website.


In your .js file, you add the standard jquery ‘ready’ code:
$(document).ready(function() {

Then select the header in your html, and give it a mousedown function:
$(“h1“).mousedown(function() {

That changes the background colour to red:

Now, when you click on the <h1> on your webpage, the background colour should change to red.

Here is an example of a cool animation function
Here is another


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s