我在我的一個項目中使用了Lightbox_me插件。這似乎很簡單,因此我的選擇。問題在於它的調用不能按預期工作。 筆者的例子:燈箱插件使用問題
$('#try-1').click(function(e) {
$('#sign_up').lightbox_me({
centered: true,
onLoad: function() {
$('#sign_up').find('input:first').focus()
}
});
e.preventDefault();
});
我的適應:
$('.compositos_DBitem').on('click', function(e){
$('.compositos_DBitem_lightbox', this).lightbox_me({
centered: true
});
e.preventDefault();
});
...這是行不通的。有任何想法嗎? Full code here:FIDDLE。
Thanx。
佩德羅
這jqeury版本使用的是現在? – SachinGutte
我正在使用jQuery 1.9.1。 – Pedro
它需要jQuery版本1.4.2 –