You should probably do something like:
$(".myClassName") .each(function (){ alert( $(this).attr('id') ); }); Leon. On Dec 10, 7:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Here is my selection: $(".myClassName") > Here is my function: function myFunction { alert( $ > (this).attr('id'); } > > So, foreach selected element in my selection I want to run myFunction > on it. > > Does that make sense? > > Thanks!