1

こんにちは、ユーザーが閉じたSqueezeBoxを検出する方法はありますか?

4

2 に答える 2

2

Squeezebox has an event for that.

this.fireEvent('onClose', [this.content]);

so when you make your squeezebox, just add:

SqueezeBox.initialize({
    onClose: function() {
        alert('dont close me');
    }, 
    other: 'options'
});

btw - this is really old. you should get a more upto date lightbox.

于 2012-06-21T11:08:46.213 に答える
0

これを行う簡単な方法: Squeezebox の閉じるボタンにはsbox-btn-closeの ID があるため、jQuery を使用してクリック イベントをアタッチできます。

$('#sbox-btn-close').click(function(){
      alert('Squeezebox closed');
});
于 2012-06-21T07:41:01.127 に答える