[jQuery] Re: How do I run a function on my selected items?

2007-12-11 Thread [EMAIL PROTECTED]
Those both do the trick. I found the solution before my post showed up in the forum. I am guessing it took several minutes before my post showed up because it needed to be moderated since it was my first post. Otherwise, I would have saved you two some time. Thanks! On Dec 10, 10:45 pm, aquaone

[jQuery] Re: How do I run a function on my selected items?

2007-12-10 Thread aquaone
http://docs.jquery.com/Utilities/jQuery.each $(".myClassName").each(function(){alert($(this).attr('id'));}); I believe... aquaone [EMAIL PROTECTED] wrote: Here is my selection: $(".myClassName") Here is my function: function myFunction { alert( $ (this).attr('id'); } So, foreach selected e

[jQuery] Re: How do I run a function on my selected items?

2007-12-10 Thread SyLon
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('i