]> source.dussan.org Git - jquery.git/commitdiff
Use String.slice instead of String.substring in order to save a three bytes. Close...
authorJason Bedard <github@jbedard.ca>
Fri, 3 May 2013 02:01:15 +0000 (19:01 -0700)
committerOleg <markelog@gmail.com>
Wed, 8 May 2013 15:56:13 +0000 (19:56 +0400)
src/data.js

index a9b4517886be22cabff9c80610db67d44c681e84..95d06a00094ed3b036fbe998669fc9afbabd24c0 100644 (file)
@@ -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 ] );
                                                }
                                        }