Is there any real different between JQuery fadeIn() and show() methods implementation wise? of course other than the fact that fadeIn has that animation thing going on. I'm asking this question because I'm seeing a weird behavior.
I have some backbone views in which I'm creating an image tag and loading them. When I want to show them, they work on fadeIn() but not on show(). So is it the problem with my code or the way JQuery implements it.
Calling show
without passing any arguments is equivalent to calling .css('display', 'block')
. If your opacity
is set to 0
you still won't see the element.
However, according to the documentation:
When a duration, a plain object, or a "complete" function is provided, .show() becomes an animation method. The .show() method animates the width, height, and opacity of the matched elements simultaneously.
So, if you want .show
to behave like .fadeIn
, you'll need to pass a parameter to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With