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

Trigger jquery events on open and close #2

Merged
merged 1 commit into from
Nov 9, 2014
Merged

Trigger jquery events on open and close #2

merged 1 commit into from
Nov 9, 2014

Conversation

tylerball
Copy link
Contributor

This would allow for code to be executed on open and close of the drawer.

@blivesta
Copy link
Owner

Great Thanks! @tylerball
But seems there is a bug in transitionEnd function.
If it like the following have multiple objects come back.

$('.drawer').on('drawer.opened',function(){
  console.log('opened');
});

transitionEnd function is looks good this code

$.fn.transitionEnd = function(callback){
  var end = "transitionend webkitTransitionEnd mozTransitionEnd oTransitionEnd MSTransitionEnd";
  return this.each(function() {
    $(this).bind(end, function(){
      $(this).unbind(end);
      return callback.call(this);
    });
  });
};

@blivesta blivesta merged commit b97e735 into blivesta:master Nov 9, 2014
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.

2 participants