some of replies were a little beyond me, but i think i get the drift, and anyway it's a way to learn.
i have a question tho, and a comment/question. how does one know, from the script given, that the class is being correctly selected ? what i mean is, is 'return' showing it somewhere ? how would i phrase an alert to see the result ? or is it shown in the console ? ok. 4 questions.
when i ran the last js, the console said "Uncaught TypeError: Cannot call method 'split' of undefined". doesn't that mean it is not running right ?