有没有可能改变这一点
<a href="http://google.com"><img src="/google.png" /></a>变成一个有效的灯箱效果?我想最终的结果应该是这样的。
<a href="/google.png"><img src="/google.png" /></a>当lightbox打开时,返回到它的原始状态:
<a href="http://google.com"><img src="/google.png" /></a>这就是我现在所拥有的..
$('a img').each(function() {
$('a').each(function() {
$(this).attr('href','/google.png');
});
});当lightbox打开时,它应该会变成这样:
$('a img').each(function() {
$('a').each(function() {
$(this).attr('href','http://google.com');
});
});如果你知道有一个脚本可以做到这一点,或者如果你能帮上忙,我将非常感激。提前感谢!
发布于 2013-01-29 16:35:26
我认为你需要像Fancybox这样的东西。这是一个JQuery灯箱插件。http://fancyapps.com/fancybox/
https://stackoverflow.com/questions/14552089
复制相似问题