我正在尝试让它工作的网站在这里:
http://www.kaimeramedia.com/derek/Website/Main_New7.html
问题是我似乎不能让highslide的代码在imageflow.js文件的末尾工作。
代码是:
domReady(function()
{
var instanceOne = new ImageFlow();
instanceOne.init({ ImageFlowID:'CGI-Archive', startID: 3, reflectionPNG: true, onClick: function() { return hs.expand(this, {src: this.getAttribute('longdesc'), outlineType: 'rounded-white', showCredits: false,fadeInOut:true, captionText: this.getAttribute('alt')}); }
});ImageFlow可以在没有它的情况下工作,但两者都应该一起工作。我做错了什么?
下面是整个imageflow.js和highslide.js文件的位置:
http://www.kaimeramedia.com/derek/Website/imageflow.js
对于highslide.js文件,用imageflow.js替换highslide.js
任何帮助都将不胜感激
发布于 2011-11-15 02:59:59
您的代码末尾缺少一个大括号。
domReady(
function()
{
var instanceOne = new ImageFlow();
instanceOne.init(
{
ImageFlowID :'CGI-Archive',
startID : 3,
reflectionPNG : true,
onClick : function() {
return hs.expand(
this,
{
src : this.getAttribute('longdesc'),
outlineType : 'rounded-white',
fadeInOut : true,
captionText : this.getAttribute('alt')
}
);
}
}
);
} // <!-- this one is missing in your code
); // EDIT: missing closing bracket here as well另一件事是错误的..。这一点:
<script type="text/javascript">var myScript = Asset.javascript(source[, properties]);</script>应该是这样的:
<script type="text/javascript">var myScript = Asset.javascript(source, [properties]);</script>或者:
<script type="text/javascript">var myScript = Asset.javascript(source, properties);</script>https://stackoverflow.com/questions/8125761
复制相似问题