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:
- <script type="text/javascript">
- function changeBelt(beltName,BeltHolder)
- {
- var obj = document.getElementById(BeltHolder);
- var imgBelt = "<img class='belt' src='"+beltName+"' border='0' />";
- obj.innerHTML = imgBelt;
- return;
- }
- </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!
-
(this).show("slide", { direction: "left" }, 500);