mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Use String.slice instead of String.substring in order to save a three bytes. Close gh-1261.
This commit is contained in:
parent
2fc6b658e8
commit
5e42df0517
@ -238,7 +238,7 @@ jQuery.fn.extend({
|
|||||||
name = attrs[ i ].name;
|
name = attrs[ i ].name;
|
||||||
|
|
||||||
if ( name.indexOf( "data-" ) === 0 ) {
|
if ( name.indexOf( "data-" ) === 0 ) {
|
||||||
name = jQuery.camelCase( name.substring(5) );
|
name = jQuery.camelCase( name.slice(5) );
|
||||||
dataAttr( elem, name, data[ name ] );
|
dataAttr( elem, name, data[ name ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user