Given the following code:
$(div.now span).text('now');
$(div.30days span).text('30days');
$(div.60days span).text('60days');
If I want to shorten things up, this seems like the logical thing to do as in:
$('span', 'div.now, div.30days, div.60days').text(some text);
Now, in the shortened version, I want to set the text to that of the class name but cant seem to figure out how to do it. Any ideas? I realize this is not an ideal thing to do but just an experiment in JQuery if you will.
Try the following:
DEMO