<p class="a b c d"> </p>
How can I iterate ( in one line) through each class which is given me by the split func ?
I tried this :
edit ( sorry )
$("p").attr("class").split(' ').each (function (i,n){alert(n)});
no success…
why this line aint working ? How can I convert the array into $ array ?
Try:
The each method only exists on jQuery objects, and split returns an array.