From 5e42df0517cefa6e81bdc5c3206740a5958b545c Mon Sep 17 00:00:00 2001 From: Jason Bedard Date: Thu, 2 May 2013 19:01:15 -0700 Subject: [PATCH] Use String.slice instead of String.substring in order to save a three bytes. Close gh-1261. --- src/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data.js b/src/data.js index a9b451788..95d06a000 100644 --- a/src/data.js +++ b/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 ] ); } }