$("p").hasClass("tiny").each(
  function(i) {
  ...do something ..
  }
);


On Jan 24, 4:13 pm, "cherry.aus...@gmail.com"
<cherry.aus...@gmail.com> wrote:
> I'm getting all knotted up on this!
>
> I'm looking to use one class, from an element with several, as a
> selector.
> Example:
>
> <div class="red tiny bold">
> <p class="tiny">
>
> target = $( 'div' ).attr( 'class' );
> // get 'tiny' from returned value
> $( "'p." + target + "'" ).doSomething();
>
> How to I get jQuery to pick out just the class I need?

Reply via email to