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

Live has been removed use on instead #1809

Merged
merged 1 commit into from Jul 17, 2015
Merged

Conversation

edds
Copy link
Contributor

@edds edds commented Jul 13, 2015

Live is removed in the next version of jQuery, use on instead which has
the same behaviour.

http://jquery.com/upgrade-guide/1.9/#live-removed

@tadast
Copy link
Contributor

tadast commented Jul 14, 2015

Have you tested that this works as intended?

It looks correct to me, but according to the docs you've linked to the preferred syntax is $(document).on('submit', formSelector, function(event){...}. I believe this syntax also works in case formSelector content is added via ajax/pjax.

Live is removed in the next version of jQuery, use on instead which has
the same behaviour.

http://jquery.com/upgrade-guide/1.9/#live-removed
@edds
Copy link
Contributor Author

edds commented Jul 15, 2015

@tadast you are indeed correct, in my head I thought I was changing bind to on. Have updated it to properly delegate rather than bind the events.

@tadast
Copy link
Contributor

tadast commented Jul 15, 2015

🆒 Looks good to me now 👍

@chrisroos
Copy link
Contributor

@edds: I don't suppose you'd be able to add some JS tests around this functionality? I realise this would be a pain because there aren't any similar tests at the moment.

@edds
Copy link
Contributor Author

edds commented Jul 16, 2015

@chrisroos without rewriting all the JavaScript, no. There is no way to tie into the JavaScript as it is all just run on load rather than following our styleguide of being encapsulated methods which can then be unit tested.

@chrisroos
Copy link
Contributor

@edds: Fair enough!

tadast added a commit that referenced this pull request Jul 17, 2015
@tadast tadast merged commit f44ead6 into master Jul 17, 2015
@tadast tadast deleted the use-on-rather-than-live branch July 17, 2015 13:00
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

3 participants