2010-12-16 101 views
1


我想在fancybox單一圖像標題內建立一個鏈接。我想它重定向到另一個fancybox窗口(女巫是內聯)...
我有一個腳本,使整個單一圖像的鏈接,但這個目標我的文檔標題,而不是錨標題... 我真的希望有人會有解決方案或更好的想法如何做到這一點! :)

謝謝謝謝謝謝yooou! :)
BTW:我幾乎從未使用腳本的工作。在深入反正...Fancybox鏈接標題

$(document).ready(function() { 

$("a.fancybox").attr('rel', 'gallery').fancybox(); 

$("a.fancylink").fancybox({ 
'title': this.title, 
'titlePosition': 'over', 
'titleFormat': function() { 
return '<span id="fancybox-title-over" style="background: url();"></span>'; 
}, 
'onComplete': function() { 
goTo = this.title; 
$("#fancybox-title").css({ 
'top':'0', 
'bottom':'0' 
}).bind('click', function() { 
$.fancybox.close(); 
return document.location.href=goTo; 
}); 
} 
}); 
}); 

回答

6
<a class="gallery" href="delete/big.png" title="text about the project :: <a href='http://www.someclient.com'>Launch website</a>"><img src="delete/thumb.png" width="115" height="115" alt="" /></a> 

$('a.gallery').fancybox({ 
'titlePosition' : 'inside' 
}); 
+0

請問,你在哪裏得到這個想法?它是否在他們的文檔中?我找不到它。謝謝! – jaminroe 2014-05-24 00:38:02