mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 09:44:56 -05:00
Effects: Add tests for jQuery.Tween
This commit is contained in:
@@ -59,8 +59,10 @@ Tween.propHooks = {
|
||||
get: function( tween ) {
|
||||
var result;
|
||||
|
||||
if ( tween.elem[ tween.prop ] != null &&
|
||||
(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
|
||||
// Use a property on the element directly when it is not a DOM element,
|
||||
// or when there is no matching style property that exists.
|
||||
if ( tween.elem.nodeType !== 1 ||
|
||||
tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
|
||||
return tween.elem[ tween.prop ];
|
||||
}
|
||||
|
||||
@@ -78,7 +80,7 @@ Tween.propHooks = {
|
||||
// Use .style if available and use plain properties where available.
|
||||
if ( jQuery.fx.step[ tween.prop ] ) {
|
||||
jQuery.fx.step[ tween.prop ]( tween );
|
||||
} else if ( tween.elem.style &&
|
||||
} else if ( tween.elem.nodeType === 1 &&
|
||||
( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
|
||||
jQuery.cssHooks[ tween.prop ] ) ) {
|
||||
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
||||
|
||||
@@ -154,7 +154,8 @@ jQuery.extend({
|
||||
expr: {
|
||||
attrHandle: {},
|
||||
match: {
|
||||
bool: /^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,
|
||||
bool: new RegExp( "^(?:checked|selected|async|autofocus|autoplay|controls|defer" +
|
||||
"|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$", "i" ),
|
||||
needsContext: /^[\x20\t\r\n\f]*[>+~]/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user