$( "#selector" ).each(
// For each item in the "selector", run this code. The "index" is the
// loop iteration index on the current element.
function( index ){
// Bind the onclick event to simply alert the
// iteration index value.
$( this ).bind (
"click",
function(){
alert( intIndex + " of " + $( "#selector" ).length);
}
);
}
);
No comments:
Post a Comment