对于如何将wordpress post图像附件集成到supersized.js所需的数组中以便于格式化,有什么建议吗?
http://www.buildinternet.com/project/supersized/ http://buildinternet.com/project/supersized/slideshow/3.1/fade.html
它需要像这样的数组中的图像-
幻灯片://幻灯片放映图像{图像:'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/quietchaos-kitty.jpg',标题:‘安静的混沌由基蒂·加兰诺’,网址:'http://www.nonsensesociety.com/2010/12/kitty-gallannaugh/'},{图像:'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/wanderers-kitty.jpg',标题:‘流浪者由基蒂·加兰诺’,网址:'http://www.nonsensesociety.com/2010/12/kitty-gallannaugh/'},{图片:'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/apple-kitty.jpg',标题:'Applewood by Kitty Gallannaugh',网址:'http://www.nonsensesociety.com/2010/12/kitty-gallannaugh/'}
我找到了这个- https://www.wpoutfitters.com/2011/01/wordpress-image-attachment-gallery-revisited/,但不确定如何使其适合数组。
这个网站似乎能够在html body http://www.cstone.com.au中使用supersized.js图像
发布于 2011-11-07 04:35:14
$(function() {
var imgpad = $("img.bgscaler").prop('src');
jQuery(function($){
$.supersized({
slides : [ {image : imgpad, title : 'Achtergrond'} ]
});
});
});将图像加载到站点后,可以提取src url并将其放入一个变量中。现在,您可以将此输入到supersized中。确保您为图像提供了一些css以显示它:无。
就这样。
https://stackoverflow.com/questions/6359885
复制相似问题