統合しようとしていjQuery shadowbox
ます。td
だから私はそれが'sのためにできるかどうかを知る必要があります。シャドウボックスのドキュメントに従って、リンクにrel=shadowbox
を追加する必要があります。
しかし、私の場合、リンクtable
の代わりに持っています。したがって、ユーザーがいずれかをクリックすると、シャドウボックスが開きます。シャドウボックスで可能ですか?td
ドキュメントから取得:
Shadowbox.init({
// skip the automatic setup again, we do this later manually
skipSetup: true
});
window.onload = function() {
// set up all anchor elements with a "movie" class to work with Shadowbox
Shadowbox.setup("a.movie", {
gallery: "My Movies",
autoplayMovies: true
});
};
あなたの場合、td.your_class
の代わりに使用してくださいa.movie
。
編集:コンテンツがどうあるべきかわかりませんが、これを行うことができます:
Shadowbox.init({
skipSetup: true
});
$('table td').click(function(e) { // when td is clicked..
Shadowbox.open({
content: '<p>Put your content here.</p>',
player: 'html',
title: 'My shadowbox'
});
});
と に注意してplayer
くださいcontent
。