Here is the code... I'm new to this. Thanks in advance for any advice!
<script type="text/javascript">
$(function () {
var url = "http://localhost:8888/wordpress_hattie/wp-content/uploads/2015/04/",
imgArray = [url+"paper_shape3.svg",
url+"mustard_shape2.svg",
url+"alt_shape.svg"],
randomNumber = Math.floor((Math.random() * imgArray.length)),
baseUrl = "url('" + imgArray[randomNumber] + "')";
$(".par_layer").css('background-image', baseUrl);
})();
</script>
Aucun commentaire:
Enregistrer un commentaire