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