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

Add off method #60

Merged
merged 1 commit into from
Feb 15, 2016
Merged

Add off method #60

merged 1 commit into from
Feb 15, 2016

Conversation

jamesfzhang
Copy link
Contributor

What do you think? @peduarte See #59 for details. Thanks!

@peduarte
Copy link
Owner

Hey @jamesfzhang i'm definitely opened to this. I'll do some tests to make sure it's working and then merge.

Thanks!

@jamesfzhang
Copy link
Contributor Author

@peduarte Fantastic. I've been using this locally for testing and it works fine. Thanks!

@@ -154,9 +154,11 @@

// Method so it is nicer for the user to use custom events
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace this comment with:
Method to bind custom event

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@jamesfzhang
Copy link
Contributor Author

Just updated the commit with comments.

@peduarte
Copy link
Owner

Nice one, thank you

@peduarte
Copy link
Owner

@jamesfzhang Hey,
I did some tests, and in this scenario, the off method does not seem to work.
http://codepen.io/peduarte/pen/bEzVpb?editors=1111
Scroll down to the end of the code in the JS Panel and you'll see what it is.

@jamesfzhang
Copy link
Contributor Author

@peduarte You need to use a named function (as opposed to an anonymous function) like so:

http://codepen.io/anon/pen/adXJVx?editors=1111

@peduarte
Copy link
Owner

Ok, that's good. I'm happy with it!
Can you also update the docs to include the off method there? Then it's good to merge 👍

@jamesfzhang
Copy link
Contributor Author

@peduarte Just updated the readme. Thanks!

@peduarte
Copy link
Owner

👍

peduarte pushed a commit that referenced this pull request Feb 15, 2016
@peduarte peduarte merged commit 5312a7c into peduarte:master Feb 15, 2016
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.

None yet

2 participants