誰も私の質問に答えるために喜んではなかったので、私はsimpleModalのソースコードを掘って、それを自分自身をしました。
私はそれがモーダルウィンドウを閉じるために使用する関数を発見し、私はそれが物事を削除し、ちょうどそれらを隠すためにそれを変更するセクションを探しまで、私はソースを通じて見えました。
注:私の修正は、ユーザによって変更されようとしているが、それは私がのような静的な情報のためのウィンドウを使用して、誰のために働くだろうモーダルウィンドウ内の情報を持っている人々のために動作しません。
単にソースコードにこれらの変更を適用する:に(このコードはsimpleModalバージョン1.4.1の非修飾ソース線664で開始)
// if the data came from the DOM, put it back
if (s.d.placeholder) {
var ph = $('#simplemodal-placeholder');
// save changes to the data?
if (s.o.persist) {
// insert the (possibly) modified data back into the DOM
ph.replaceWith(s.d.data.removeClass('simplemodal-data').css('display', s.display));
}
else {
// remove the current and insert the original,
// unmodified data back into the DOM
s.d.data.hide().remove();
ph.replaceWith(s.d.orig);
}
}
else {
// otherwise, remove it
s.d.data.hide().remove();
}
// remove the remaining elements
s.d.container.hide().remove();
s.d.overlay.hide();
s.d.iframe && s.d.iframe.hide().remove();
setTimeout(function(){
// opera work-around
s.d.overlay.remove();
// reset the dialog object
s.d = {};
}, 10);
:から
// if the data came from the DOM, put it back
if (s.d.placeholder) {
var ph = $('#simplemodal-placeholder');
// save changes to the data?
if (s.o.persist) {
// insert the (possibly) modified data back into the DOM
ph.replaceWith(s.d.data.removeClass('simplemodal-data').css('display', s.display));
}
else {
// remove the current and insert the original,
// unmodified data back into the DOM
s.d.data.hide();
}
}
else {
// otherwise, remove it
s.d.data.hide();
}
// remove the remaining elements
s.d.container.hide();
s.d.overlay.hide();
s.d.iframe && s.d.iframe.hide();
setTimeout(function(){
// opera work-around
s.d.overlay.remove();
// reset the dialog object
s.d = {};
}, 10);
私は4行のみ変更しましたが、現在はsimpleModalはcontあなたがウィンドウを閉じても、ウィンドウはアンロードされません。
、simpleModalのための未修正のソースを入手するには、私はそれをダウンロードするには、以下の置かれているリンクをクリックしてください。
simpleModal
注開発の目的のための完全な、非圧縮のソースコードです。編集を終えたら、次のWebサイトを使用して圧縮することをお勧めします。JavascriptCompressor
質問の色を付けるためにサンプルコードを入力してください。 –
サンプルコードはありません。コードはプラグインの中にあります。ここにはすべてのコードを投稿する方法はありません。私の質問とは何の関係もないので、無意味に投稿できるコードは他にありません。私は問題の例を含むサイトにリンクを張ることができますが、それは私ができることです –