Skip to content
Recommend our themes and earn 30% of our share of every sale you bring. Free to join.Earn by recommending our themes Become an affiliate

jQuery preload images before page load

Updated 19 Sep 2018

Source code

<script>
	var images = [
				"img/image_1.jpg",
				"img/image_2.jpg",
				"img/image_3.jpg"
			]'
	$(images).each(function(){
		$("<img/>")[0].src = this;
	});
</script>

More code answers

Comments

Log in to leave a comment.