Use String.slice instead of String.substring in order to save a three bytes. Close gh-1261.

This commit is contained in:
Jason Bedard 2013-05-02 19:01:15 -07:00 committed by Oleg
parent 2fc6b658e8
commit 5e42df0517

View File

@ -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 ] );
} }
} }