by

ajaxn - ified image preloader... its gewd!

ajaxn - ified image preloader... its gewd!: 
ajaxPreloader.js
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/136113/ajaxn---ified-image-preloader----its-gew?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
(function() { var f = []; $.ajax({ url: "imgz.js", type: "GET", contentType: "json", cache: true, success: function(data) { var j = JSON.parse(data); var $c = $("#container"); for (var x = 0; x < j.length; x++) { var imag = document.createElement("img"); imag.src = j[x].src; $(imag).css("height", "100%").css("width", "100%"); f[x] = imag; $c.append(imag); } return f; }, error: function(jqXhr, textStatus, error) { alert("ERROR: " + textStatus + ", " + error); } }); })();
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus