.bind() event using jQuery

To bind event to an element using jQuery is very easy task.
See the following examples,

$('#foo').bind('click', function() {
      // other stuff

You can also call external function like below,

function clickEvent()

$('#foo').bind('click', clickEvent);

Another way to bind event,


or you can write inline function like below,


Avatar for Multidots
Author: Multidots
Multidots is full service enterprise software development company with services revolving around consulting, enterprise-grade custom application development, custom mobile and cloud applications to automated and manual testing. We are proud to have served mid-sized to large enterprises including Fortune 500 Companies in our clientele.

Leave a Reply


Quick Contact

I'm interested in receiving periodic updates and mailers from Multidots