Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added check for already hidden elements #150

Closed
wants to merge 1 commit into from
Closed

Added check for already hidden elements #150

wants to merge 1 commit into from

Conversation

Blackskyliner
Copy link

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

prop.opacity === 'show' && jQuery(this).css('opacity') === 1

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant