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

[Transition] this is Not Correctly Set on Callbacks #2758

Closed
avalanche1 opened this issue Aug 1, 2015 · 2 comments
Closed

[Transition] this is Not Correctly Set on Callbacks #2758

avalanche1 opened this issue Aug 1, 2015 · 2 comments
Milestone

Comments

@avalanche1
Copy link
Member

$('#mainPhotoLabel').transition('fade out', {onHide:-> this.removeClass('hidden'})
I would like to be able to remove class hidden from #mainPhotoLabel after animation is finished.

@startswithaj
Copy link

Yeah I can see what your saying here.

In transition.js module.hide() calls settings.onHide.call(this); which sets the context to the semantic Module. The semantic module instance has access to but does not expose $module (the underlying jquery wrapped element).

You could change it to settings.onHide.call($module); or you could leave it and do

this.$module = $module
settings.onHide.call(this);

but I would say $module is obscured for a reason.

In the mean time you can do something like

$elm = $('#mainPhotoLabel')
$elm.transition 'fade out', onHide : -> $elm.removeClass('hidden')

@jlukic
Copy link
Member

jlukic commented Aug 3, 2015

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

No branches or pull requests

3 participants