How to add slide effect when switching images with external trigger?

How to add slide effect when switching images with external trigger?

Hi,

I'm really new at jquery and am trying to achieve a relatively simple effect but having a hard time.  I have the code to swap the images displayed in a particular div with an external trigger but want to add a slide effect to the new images that loads upon activating the trigger.  The code I have so far is:

  1. <script type="text/javascript">
  2. function changeBelt(beltName,BeltHolder)
  3. {
  4. var obj = document.getElementById(BeltHolder);

  5. var imgBelt = "<img class='belt' src='"+beltName+"' border='0' />";

  6. obj.innerHTML = imgBelt;

  7. return;
  8. }
  9. </script>

I've tried adding slides functions such as the one below to just bout ever piece of the script I have and all I've managed to do is break the script as a whole.  If anyone could offer and advice on how to get the image to load with an effect, I'd greatly appreciate it!

  1. (this).show("slide"direction"left" }500);