我使用api從flickr動態加載圖像。但是,當我嘗試使用colorbox,prettyphoto或其他jquery模式窗口 - 它們不起作用。到較大圖像的鏈接僅在新窗口中打開圖像。jquery模式插件不能用於動態加載的圖像
我的測試頁: http://www.thinquetanque.com/test/full/test.html#/advanced-usage
我假設圖象已被拉扯之前它是由於模態插件的加載。
想法如何抵消?
謝謝!
更新:
嘗試使用:
$('.colorbox').live('click', function() { $.fn.colorbox({href:$(this).attr('href'), open:true}); return false; }
這並不工作 - 但我想我的Flickr API中使用 - 使用.live如下建議。我正在使用的flickr api使用.live爲div的子元素添加屬性。
$('#wrapper').live('mouseover', function(){
$(this).children('p').attr('class', 'image-info');
});
但我無法弄清楚如何改變上面的使用colorbox。我改變了鼠標懸停點擊,但我不知道如何使用$(this).children添加colorbox功能
我想下面的 - 但沒有運氣--- $活( '點擊 '函數(){$ .fn(' 顏色框。')。 .colorbox({href:$(this).attr('href'),open:true}); return false; } – Jason 2011-02-28 00:25:58