Is there a better, more jQuery-ish way of handling this image substitution?
var image = $(obj).children(\"img\");
if ($(image).attr(\"src\") == \"Images/TreeColl
Wow. Answers come flying in, don't they? All of the above would work, but you could try this for a one-liner (it's untested)...
image.setAttribute("src", "Images/Tree" + ((image.getAttribute("src").indexOf("Collapse")>0) ? "Expand" : "Collapse") + ".gif");
Update: I've just tested this and it works, so would the person who voted it down care to explain why they did that?