Any suggestions of how to integrate wordpress post image attachments into the array required by supersized.js for easy formatting?
http://www.buildinternet.com/project/supersized/ http://buildinternet.com/project/supersized/slideshow/3.1/fade.html
It needs images in an array like -
slides : [ //Slideshow Images {image : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/quietchaos-kitty.jpg', title : 'Quiet Chaos by Kitty Gallannaugh', url : 'http://www.nonsensesociety.com/2010/12/kitty-gallannaugh/'}, {image : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/wanderers-kitty.j开发者_开发知识库pg', title : 'Wanderers by Kitty Gallannaugh', url : 'http://www.nonsensesociety.com/2010/12/kitty-gallannaugh/'}, {image : 'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/apple-kitty.jpg', title : 'Applewood by Kitty Gallannaugh', url : 'http://www.nonsensesociety.com/2010/12/kitty-gallannaugh/'} ]
I've found this - https://www.wpoutfitters.com/2011/01/wordpress-image-attachment-gallery-revisited/ but not sure how to make it fit for an array.
this websites seems to be able to use supersized.js with images in the html body http://www.cstone.com.au
$(function() {
var imgpad = $("img.bgscaler").prop('src');
jQuery(function($){
$.supersized({
slides : [ {image : imgpad, title : 'Achtergrond'} ]
});
});
});
After you have loaded the image into your site, you can extract the src url and put it into a variable. Now you can input this into supersized. Make sure that you give the image some css to put it on display:none.
That's it.
精彩评论