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

1.9 Upgrade Guide: examples show correct usage but intro text says both #14

Closed
rdworth opened this issue Jan 24, 2013 · 0 comments
Closed

Comments

@rdworth
Copy link
Contributor

rdworth commented Jan 24, 2013

In the .attr() versus .prop() section there's a sentence that introduces some code samples "Here are some examples of correct and incorrect usage when setting checked on a checkbox;" but it's a bit confusing because then all four examples are correct usage

// Correct if changing the attribute is desired
$(elem).attr("checked", "checked");
// Correct for checking the checkbox
$(elem).prop("checked", true);

// Correct if removing the attribute is desired
$(elem).removeAttr("checked");
// Correct for clearing the checkbox
$(elem).prop("checked", false);

where the sentence said there were correct and incorrect usage examples coming.

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