0
我有一個快速問題,(我希望它是快速的)。fancybox,點擊元素的返回值
我的fancybox插件(jQuery的) - http://fancybox.net/
$(".Sets a").fancybox({
'onComplete' : function(){
$('#fancybox-inner').prepend('<a href="#">'+ **clicked element rel** +'</a>')}
});
有一種正確的方式,藉此價值,在我的腦海現在我可以看到的,只是增加一個類點擊的元素,在這個類可以幫助我檢測哪個元素被點擊。
將是真棒有類似
$(".Sets a").fancybox({
'onComplete' : function(){
$('#fancybox-inner').prepend('<a href="#">'+ $(this).attr("rel") +'</a>')}
});
謝謝!
+1 - 不要把它包裝雖然兩次,你克隆吧:)只是'_this.attr( 「相對」)'就足夠了,這是*已經*一個jQuery對象:) – 2010-06-26 11:28:17