Created
October 5, 2013 02:30
-
-
Save remotevision/6835894 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// images = [{ name: 'image name', data: [data or data url] }] | |
(function($) { | |
$.imageUrl = function(images, key) { | |
var imageObject = $.grep(images, function(e){ return e.name == key; }); | |
if(imageObject.length > 0) { | |
return imageObject[0].data; | |
} else { | |
return null; | |
} | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment