We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaa2df6 commit 50c62fdCopy full SHA for 50c62fd
test/attributes.js
@@ -71,8 +71,11 @@ test( "attrHooks[\"value\"]", function() {
71
});
72
73
expectWarning( "button.attr(...)", 0, function() {
74
- var button = jQuery("#button");
75
- if ( jQuery.fn.jquery >= "1.9" ) {
+ var button = jQuery("#button"),
+ majorMinorPatch = jQuery.fn.jquery.split(".");
76
+
77
+ // Respect the jQuery 1.9.0+ behavior change
78
+ if ( majorMinorPatch[0] > 1 || ( majorMinorPatch[0] === "1" && majorMinorPatch[1] >= 9 ) ) {
79
equal( button.attr("value"), undefined, "button.attr('value') returns attribute." );
80
} else {
81
equal( button.attr("value"), "", "button.attr('value') returns empty string." );
0 commit comments