Permalink
Browse files

Use String.slice instead of String.substring in order to save a three…

… bytes. Close gh-1261.
  • Loading branch information...
jbedard authored and markelog committed May 3, 2013
1 parent 2fc6b65 commit 5e42df0517cefa6e81bdc5c3206740a5958b545c
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/data.js
@@ -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 ] );
}
}

0 comments on commit 5e42df0

Please sign in to comment.