jquery click function

Bind something to a click event on an element using jquery. Needs to be combined with a document ready.


<div id="target">i'm the target!</div>


$( "#target" ).click(function() {
  alert( "Handler for .click() called." );


i'm the target!

Page Views

This page has been viewed 113 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.