Added check for already hidden elements #150
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for #128
It is just needed for fadeOut elements, as for fadeIn it seems to work flawless, even on subsequent calls to fadeIn. At least in the tests I did, if someone could provide another where it does not work just post.
Problem for fadeIn or better 'prop.opacity == show' its not so easy to bypass as we would want to do CSS while opacity >= 0 to 'show' or to another opacity. We could at least check for
but as this would add even more overhead I would suggest just to add it if it is really needed, aka some simple test example which shows the callback not to work for subsequent fadeIn's.
I think the place seems right, as we won't have called the whole cssCallback magic. It adds a bit stress though, because we need to encapsulate the DOM element inside jQuery to check for ':hidden'