treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Image/span fade-in with JS and CSS swapping.

  • Alright so I already have a system setup to show a paragraph and switch an image out for each link on one of the pages on my website. What I'm looking to do is add a fade-in transition effect on the image and paragraph to make it look a bit smoother and less choppy. I have been trying to do this myself, but being the JS/jQuery noob that I am failed miserably. I also tried using CSS3 but haven't had the chance to really learn that either.

    If anyone has a simple solution for this, please let me know. If it's going to take a obsessive amount of additions then odds are I will just leave it as is. Thanks.
  • Without seeing what you've tried, its hard to diagnose what to do. But, have you tried using jQuery's fadeIn() ?

    http://api.jquery.com/fadeIn/
  • I'm using CSS to have spans linked to links that change on hover of a list item.
    I'm using JS to swap images on hover of a list item as well.

    I'd like to make it so they both fade in and out when they swap. If you need any more information I will try to give as much as possible but I cannot publish any content from the website.