问题描述
|
关于如何将wordpress发布图像附件集成到supersized.js所需的数组中以便格式化的任何建议?
http://www.buildinternet.com/project/supersized/
http://buildinternet.com/project/supersized/slideshow/3.1/fade.html
它需要数组中的图像,例如-
幻灯片:[//幻灯片图像
{image:\'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/quietchaos-kitty.jpg \',标题:\'Kitty Gallannaugh的《安静的混乱》,网址:\'http ://www.nonsensesociety.com/2010/12/kitty-gallannaugh/ \'},
{image:\'http://buildinternet.s3.amazonaws.com/projects/supersized/3.1/slides/wanderers-kitty.jpg \',标题:\'Wanderers by Kitty Gallannaugh \',网址:\'http: //www.nonsensesociety.com/2010/12/kitty-gallannaugh/ \'},
{image:\'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/
但不确定如何使其适合数组。
这个网站似乎可以将supersized.js与html正文中的图像一起使用
http://www.cstone.com.au
解决方法
$(function() {
var imgpad = $(\"img.bgscaler\").prop(\'src\');
jQuery(function($){
$.supersized({
slides : [ {image : imgpad,title : \'Achtergrond\'} ]
});
});
});
将图片加载到网站中之后,您可以提取src网址并将其放入
一个变量。现在,您可以将其输入到超大尺寸中。
确保给图像一些CSS以使其显示:无。
而已。