$("a.hello_world").each(function() {
      //  $(this) = this current hyperlink
});

On Mar 20, 12:48 pm, Thierry <lamthie...@gmail.com> wrote:
> I have a bunch of hyperlinks with class 'hello_world'.  I want to
> assign each one of them a random colour.  I can set the colour for all
> of them with the following:
>
> $("a[class=hello_world]").css("color", "red");
>
> How can I iterate over every element with class name 'hello_world'?

Reply via email to