jonhobbs wrote:
Both of those would work as solutions to this problem.

However, I'd still really like to find out if there's a way to get a
list (array?) of all of the classes that are currently attached to an
element and loop through them.

It doesn't dound like it should be so hard.

Jon


you could loop through all elements with $('.button'), and get their attr('class'), put those elements in an array, then parse that srting with a regex to see if you have a match.

It can be done, but I just wouldn't recommend it. Use seperate classes like MorningZ suggested and you don't even need to use javascript if all you want to do is put an image in a class (that really is a job css was made for, javascript should just stick to the behavioural stuff).

Jonathan
--
Jonathan Vanherpe - Tallieu & Tallieu NV - jonat...@tnt.be

Reply via email to