Posted By

anobre on 12/13/09


Tagged

click


Versions (?)

Click event with el loop and bind()


 / Published in: jQuery
 

  1. $( 'el' ).each(
  2. function( intIndex ){
  3. $( this ).bind (
  4. "click",
  5. function(){
  6. alert( "tab number: " + intIndex ); //loop
  7. $(this).addClass("hilite"); //css
  8. var thisTarget = $(this).html(); //grab innerHTML
  9. }
  10. );
  11.  
  12. }
  13. );

Report this snippet  

You need to login to post a comment.