Dynamically call all images into javascript
-
Below I have a piece of code I am trying to implement dynamically with wordpress. Can someone help me find a way to load all images from a post (on single.php) so that they will be called below where I have boldfaced the words?
$(document).ready(function(){ // Initialize Backgound Stretcher $('BODY').bgStretcher({ images:<strong> ['images/sample-1.jpg', 'images/sample-2.jpg', 'images/sample-3.jpg', 'images/sample-4.jpg']</strong>, imageWidth: 1024, imageHeight: 768 }); });I want something like this:
$(document).ready(function(){ // Initialize Backgound Stretcher $('BODY').bgStretcher({ images:<strong> [<?php {all the images uploaded separated by commas} ;?>]</strong>, imageWidth: 1024, imageHeight: 768 }); });
The topic ‘Dynamically call all images into javascript’ is closed to new replies.