以下代码会导致:
未捕获到的SyntaxError:意外令牌<< / p>
任何想法如何解决此问题?我的目标是将超大尺寸与目录图像发现一起使用,而不是与其一起使用的静态HTML条目。我发现一篇文章(http://www.zachmelo.com/customizing-supersize-jquery/)谈到了这一点,但是代码在幻灯片上抛出了错误:[<
jQuery(function($){
$.supersized({
// Functionality
slide_interval : 3000, // Length between transitions
transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
transition_speed : 700, // Speed of transition
// Components
slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank')
slides :[<?php
$directory = "/img/";
$directory_thumbs = "/img/thumbs/";
$images = glob($directory . "*.png");
$images_thumb = glob($directory_thumbs . "*.png");
$images_final = array_combine($images,$images_thumb);
foreach($images_final as $image = $key)
{
$name= $image;
$name-chop= trim($name, $directory);
$name-chop= trim($name-chop, ".png");
$name-chop= str_replace('_',' ', $name-chop);
echo "{image : ' $image ', title : ' $name-chop ' , thumb : '$key' },";
}?>]
});