jQuery: Attaching Functions to Dom Nodes

Description Javascript

Attaching Functions to Dom Nodes

The Code Download

  1. $('p').data('lert', function () {
  2.     alert('I\'m attached to a node!');
  3. });
  4.  
  5. $('p').data('lert')();

Credits

Added by JC on 20th October 2009

Comments

There are no comments about this snippet.

Post Comment Github Markdown Supported

You must be logged in to post a comment.

Login here to post a comment