I'm trying to create an effect where you click on a thumbnail image, and the link to the thumbnail will replace the main image, but fade it in. This is the code I'm currently using:
This works and replaces the image without a fade effect. What do I need to change to get the fadeIn effect to work? | ||
add a comment |
67 | You have to make it Try this :
It should | ||
29 | I thing instead of using FadeIn and fadeOut, its better to use fadeTo functionality as fadeIn and fadeOut created a time gap between them for few micro-seconds. I have used above code from Sylvain : thanks to him
| ||||||||||||||||
|
0 | You cannot fade-in something that is already at 100% alpha :) In other words, you either fade it out or hide it, and then fade it in. I made this example, basically, I hide it and then fade it: | ||
0 | I reproduced the given samples above. It gives a strange flickering, which I found that it waits for image to load after it's opacity is restored to 1. I modified the code by Sandeep.
|
'WEB > jQuery' 카테고리의 다른 글
jQuery event to trigger action when a div is made visible (0) | 2018.01.22 |
---|---|
[Javascript] 숫자 3자리 단위마다 콤마(comma) 찍기 (0) | 2018.01.14 |
jQuery change() Method (0) | 2018.01.14 |
PHP array_push (0) | 2018.01.14 |
Fatal error: Call to a member function query() on null (0) | 2018.01.14 |