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

Switch away from deprecated jQuery methods #619

Merged
merged 2 commits into from Jul 10, 2015
Merged

Switch away from deprecated jQuery methods #619

merged 2 commits into from Jul 10, 2015

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jul 10, 2015

  • Switch from .live to .on
  • Use prop over attr for disabling/enabling buttons

Identified in https://trello.com/c/wVQ2q3Mr/22-spike-how-can-we-upgrade-jquery-on-static-2-days

cc @edds

fofr added 2 commits Jul 9, 2015
`.live` is deprecated in jQuery 1.7

Weirdly, renaming live to on caused a parse error when running the
jasmine specs. The cause of this seems to be the above data attribute
with the value: 'javascript:void();’

Looking at the specs and survey I can’t see why this reset is needed,
and when removing it the tests continue to pass.
“The difference between attributes and properties can be important in
specific situations. Before jQuery 1.6, the .attr() method sometimes
took property values into account when retrieving some attributes,
which could cause inconsistent behavior. As of jQuery 1.6, the .prop()
method provides a way to explicitly retrieve property values, while
.attr() retrieves attributes.”
edds added a commit that referenced this pull request Jul 10, 2015
Switch away from deprecated jQuery methods
@edds edds merged commit 629c232 into master Jul 10, 2015
1 check passed
1 check passed
default "Build #534 succeeded on Jenkins"
Details
@edds edds deleted the live-on branch Jul 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.