Last active
August 29, 2015 14:15
-
-
Save gravitano/9ec3c48c827e9c544e4e to your computer and use it in GitHub Desktop.
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<!-- | |
Created using JS Bin | |
http://jsbin.com | |
Copyright (c) 2015 by anonymous (http://jsbin.com/tusafajege/1/edit) | |
Released under the MIT license: http://jsbin.mit-license.org | |
--> | |
<meta name="robots" content="noindex"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<textarea> | |
<img src="http://placehold.it/50x50"> | |
<img src="http://placehold.it/50x50"> | |
<img src="http://placehold.it/50x50"> | |
<img src="http://placehold.it/50x50"> | |
<img src="http://placehold.it/50x50"> | |
<img src="http://placehold.it/50x50"> | |
</textarea> | |
<div id="hidden" style="display:none;"></div> | |
<script> | |
$(document).ready(function() | |
{ | |
var textareaContents = $('textarea').val(); | |
$('#hidden').html(textareaContents); | |
var images = $('#hidden img'); | |
var results = []; | |
images.each(function(i,item) | |
{ | |
results.push(item.src); | |
}); | |
console.log(results); | |
}); | |
</script> | |
<script src="http://static.jsbin.com/js/render/edit.js?3.25.14"></script> | |
<script>jsbinShowEdit && jsbinShowEdit({"static":"http://static.jsbin.com","root":"http://jsbin.com"});</script> | |
<script src="http://static.jsbin.com/js/vendor/eventsource.js?3.25.14"></script> | |
<script src="http://static.jsbin.com/js/spike.js?3.25.14"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment