在Javascript照片库中插入锚-不工作?

在Javascript照片库中插入锚-不工作?,javascript,html,hyperlink,anchor,photo-gallery,Javascript,Html,Hyperlink,Anchor,Photo Gallery,我正在使用(和)为我的网站创建一个照片库。画廊加载,并在一个很好的旋转木马格式。我想添加锚,这样我可以直接链接到画廊内的某张照片。我试图在HTML中添加一个锚,但它不起作用。我认为这是因为当页面加载时,库需要几秒钟才能加载,因此不会重定向到锚。我很容易出错,我需要一些建议,我应该尝试让锚工作。以下是锚定和照片本身的示例代码: <div class="item"> <a name="anchor3" id="anchor3"></a> <

我正在使用(和)为我的网站创建一个照片库。画廊加载,并在一个很好的旋转木马格式。我想添加锚,这样我可以直接链接到画廊内的某张照片。我试图在HTML中添加一个锚,但它不起作用。我认为这是因为当页面加载时,库需要几秒钟才能加载,因此不会重定向到锚。我很容易出错,我需要一些建议,我应该尝试让锚工作。以下是锚定和照片本身的示例代码:

<div class="item">
    <a name="anchor3" id="anchor3"></a>
      <img class="content hidden" src="thumbs/tree-w-sun.jpg" alt="Gifts" />
            <div class="ref hidden">item8</div>
            <div class="caption"><h3>Gifts</h3></div>
            <div class="comment hidden"></div>
            <div class="author hidden"></div>
            <div class="params hidden"></div>
            <div class="info hidden"><div><p>Artist: UBhapE2</p></div></div>
            <div class="thumbWidth hidden">261</div>
            <div class="thumbHeight hidden">350</div>
            <a id="item8" class="lightwindow hidden" title="<h3>Gifts</h3>" 
               rel="gal[cat]" href="slides/tree-w-sun.jpg" ></a>
    </div>
脚本2-“ContentFlow JS”这个JS很长,为了节省空间,我将链接直接放在

脚本3-此脚本位于以下页面中:

<script language="JavaScript" type="text/javascript">
var startItem = getParam('p');
if(startItem == "") startItem = "first";
if(startItem.isNaN) startItem = "'"+startItem+"'";

new ContentFlow('contentFlow', {
    reflectionColor: "#000000",
    maxItemHeight: 350,
    marginTop: 50,
    reflectionHeight: 0.25,
    endOpacity: 1,
    startItem: startItem,
    circularFlow: false,
    stretchThumbs: false
});


function lightWindowInit() {
    LightFlowGlobal.myLightWindow = new lightwindow({
            infoTabName : "More Info",
            rootPath: "res/lightwindow/",
            loadingTxt: "loading or ",
            cancelTxt: "cancel",
            playTxt: "start slideshow",
            stopTxt: "stop slideshow",
            slowerTxt: "slower by 1 second",
            fasterTxt: "faster by 1 second",
        downloadSlideTxt: "Download",
        downloadSlide: false,
            showSlideshow: false,
            slideshowDuration: 5000,
        circular: false,
        animationDuration: 0.25
        });
}
LightFlowGlobal.readyJS=true;
var rootPath = ".";

</script>

var startItem=getParam('p');
如果(startItem==“”)startItem=“第一”;
如果(startItem.isNaN)startItem=“”“+startItem+””;
新建ContentFlow(“ContentFlow”{
reflectionColor:#000000“,
最大项目高度:350,
玛金托普:50,
反射率高度:0.25,
内生性:1,
斯塔蒂姆:斯塔蒂姆,
循环流:false,
stretchThumbs:错误
});
函数lightWindowInit(){
LightFlowGlobal.myLightWindow=新的lightwindow({
infoTabName:“更多信息”,
根路径:“res/lightwindow/”,
LoadingText:“正在加载或”,
cancelTxt:“取消”,
playTxt:“开始幻灯片放映”,
stopTxt:“停止幻灯片放映”,
slowerTxt:“慢一秒”,
FasterText:“快1秒”,
DownloadSlideText:“下载”,
下载幻灯片:错误,
幻灯片放映:错误,
幻灯片放映时间:5000,
通告:错,,
动画持续时间:0.25
});
}
LightFlowGlobal.readyJS=true;
var rootPath=“.”;
我不确定还需要什么脚本或css。我链接到我正在使用的测试库,需要查看页面。我会张贴额外的信息,如果要求

那么现在我如何让锚来处理这个问题呢?我对javascript不是很在行,所以请解释一下“您需要将此函数添加到脚本中”的答案,而不要解释


感谢您的一切帮助

在站点上的“文档-->项目作为链接”下,开发人员明确声明“项目中的任何元素都不得包含任何锚定”。也许有人可以提供一种绕过此限制的方法。

在站点上的“文档-->项作为链接”下,开发人员明确声明“项中的任何元素都不能包含任何锚定”。也许有人可以提供一种绕过这一限制的方法。

我找到了照片库创建者提供的答案:

It's not only the js. You'd need to pass a parameter to AddThis in order to 
identify the image. Without it, you wouldn't know which image has been clicked. 
The best would be to use LightFlow's query paramter p=index, where index is the 
number of the image of the current web page.
For example, the following link would focus the 4th image of the gallery 
(index begins at 0): http://your-domain.com/album/index.html?p=3

我找到了照片库创建者提供的答案:

It's not only the js. You'd need to pass a parameter to AddThis in order to 
identify the image. Without it, you wouldn't know which image has been clicked. 
The best would be to use LightFlow's query paramter p=index, where index is the 
number of the image of the current web page.
For example, the following link would focus the 4th image of the gallery 
(index begins at 0): http://your-domain.com/album/index.html?p=3

对不起,如果这是完全偏离基地,但乍一看你的锚标签实际上是没有周围的任何东西。。。它只是打开和关闭。。。这是故意的吗?@Dr.Dredel-不是故意的,但当我试图将标签环绕在照片的html上时,它破坏了图库。很抱歉,如果这完全是不正确的,但乍一看,你的锚标签实际上并没有围绕任何东西。。。它只是打开和关闭。。。这是故意的吗?@Dredel博士-不是故意的,但当我试图将标签包装在照片的html上时,它破坏了图库。