Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2008
    Posts
    106
    Thanks
    27
    Thanked 3 Times in 3 Posts

    trying to add fade effect

    Hi
    I use a jcarousel in my page as a thumbnail panel, part of a photo gallery. When I click on each carousel items, there's an image appearing next to carousel.
    The code is based on changing one image's src.


    Code:
    <div id="photo"><img id="photograph" src="images/gallery/img1.jpg" /></div>

    this is the carousel:


    Code:
    <ul id="mycarousel" class="jcarousel jcarousel-skin-tango">
    
    <li><div class="thumbnail"><img src="thumbnail.php?filename=images/gallery/img1.jpg" onclick="document.getElementById('photograph').src ='images/gallery/img1.jpg'"/></div></li>
    
    <li><div class="thumbnail"><img src="thumbnail.php?filename=images/gallery/img2.jpg" onclick="document.getElementById('photograph').src ='images/gallery/img2.jpg'"/></div></li>
    
    <li><div class="thumbnail"><img src="thumbnail.php?filename=images/gallery/img3.jpg" onclick="document.getElementById('photograph').src ='images/gallery/img3.jpg'"/></div></li>
    
    </ul>

    What I want to do is add a fadein fadeout effect on the changing <img>. I have tried many things but I can't make it work.

    Can you help me? I use jquery-1.2.3.pack

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    The current version of jquery is now v 1.2.6.

    If you intend to make the image fade in and out respectively, you can utilize, Jquery's FadeIn() and FadeOut() functions.

    If you're still stumped, get back, and provide a better picture of your page, or possibly a link.
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •