For those of you that use the prototype library, I created this nifty one liner that allows easy image swapping:
img = the id of the image that you want to swap
newimg = the new image to swap it out with
* new image must be located in the same directory as the original
I hope this helps someone!
X
img = the id of the image that you want to swap
newimg = the new image to swap it out with
* new image must be located in the same directory as the original
Code:
$(img).src = $(img).src.replace($A($(img).src.split("/")).pop(), newimg);
I hope this helps someone!
X