[jQuery] Some If/Then help
Hey all,
I'm using Seamus Leahy's AddAClassNameAtRandomToAnElement.js (http://
moronicbajebus.com/2006/07/30/add-a-class-randomly-from-a-set/) to add
a random class to a div, and then trying to insert an image based on
the random class name.
So if I have
<div id="main" class="aa">
I'd like to say "if #main.aa, then insert image1.jpg; if #main.bb,
then insert image2.jpg; etc.
Just can't seem to get the syntax right. Or is there a better way to
go about this? Any help is very much appreciated