문제

Hi is there a way to detect SqueezeBox closed by user?

도움이 되었습니까?

해결책

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.

다른 팁

A simple way to do this: Squeezebox's close button has an id of sbox-btn-close so you can attach a click event to that using jQuery.

$('#sbox-btn-close').click(function(){
      alert('Squeezebox closed');
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top