1: 在你的ss()最后加上myLightbox.initialize();
这一种方便 ,但是所有的<a>对象............2:lightbox.js 给Lightbox的prototype 加上update属性,然后在你的ss()最后加上myLightbox.update(); update: function() {//类似initialize
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName('a');
for (var i=0; i<anchors.length; i++)
{
var anchor = anchors[i];
//下面是相对 initialize 多加的
//以前添加过的监听就跳过
if(anchor.onclick ){continue;} var relAttribute = String(anchor.getAttribute('rel'));
if (anchor.getAttribute('href')&&(relAttribute.toLowerCase().match('lightbox')))
{
anchor.onclick = function () {myLightbox.start(this); return false;
}
}
}
},
这一种方便 ,但是所有的<a>对象............2:lightbox.js 给Lightbox的prototype 加上update属性,然后在你的ss()最后加上myLightbox.update(); update: function() {//类似initialize
if (!document.getElementsByTagName){ return; }
var anchors = document.getElementsByTagName('a');
for (var i=0; i<anchors.length; i++)
{
var anchor = anchors[i];
//下面是相对 initialize 多加的
//以前添加过的监听就跳过
if(anchor.onclick ){continue;} var relAttribute = String(anchor.getAttribute('rel'));
if (anchor.getAttribute('href')&&(relAttribute.toLowerCase().match('lightbox')))
{
anchor.onclick = function () {myLightbox.start(this); return false;
}
}
}
},
?
谢谢支持,问题解决,累死我了,写这个js的人真强,看的我头晕。明天揭贴。接分的快
能不能看看那个js