Permalink
Browse files

Widget: Use new $.mobile.getAttribute function instead of jqmData for…

… a 70% perf improvement.

http://jsperf.com/data-ignore/2
  • Loading branch information...
gabrielschulhof committed Apr 11, 2013
1 parent 8113b4a commit 2e48c7ba70556c9cd34633c7aafe24332d3abd11
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/jquery.mobile.widget.js
@@ -26,9 +26,9 @@ $.widget( "mobile.widget", {
$.each( this.options, function( option ) {
var value = elem.jqmData( option.replace( /[A-Z]/g, function( c ) {
var value = $.mobile.getAttribute( elem[ 0 ], "data-" + $.mobile.ns + ( option.replace( /[A-Z]/g, function( c ) {
return "-" + c.toLowerCase();
})
}))
);
if ( value !== undefined ) {

0 comments on commit 2e48c7b

Please sign in to comment.