From 4e8e8deacf4128ce487bece493ec228da00bd900 Mon Sep 17 00:00:00 2001 From: cecilialam Date: Fri, 26 Apr 2013 14:56:01 -0300 Subject: [PATCH] Update jquery-picture.js I update the setFigure() function so that other data attributes are allowed on the FIGURE tag. --- js/jquery-picture.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/js/jquery-picture.js b/js/jquery-picture.js index 9fbf510..b62c395 100644 --- a/js/jquery-picture.js +++ b/js/jquery-picture.js @@ -228,14 +228,14 @@ $.each(mediaObj, function(media, path){ var num; + if (0 == media.indexOf('media')) { + num = media.replace(/[^\d.]/g, ''); - num = media.replace(/[^\d.]/g, ''); - - if(!num) - num = 0; - - sizes[num] = path; + if(!num) + num = 0; + sizes[num] = path; + } }); if(element.find('img').length == 0){ @@ -276,4 +276,4 @@ }; -})(jQuery); \ No newline at end of file +})(jQuery);