Hi is there a way to detect SqueezeBox closed by user?
Asked
Active
Viewed 2,547 times
2 Answers
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.

Dimitar Christoff
- 26,147
- 8
- 50
- 69
-
Is there a way to prevent the squeezebox from closing? – doovers Feb 28 '14 at 02:17
0
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');
});

Christopher Tokar
- 11,644
- 9
- 38
- 56
-
11. this is not jquery. 2. you can close it by esc or by clicking on the overlay. – Dimitar Christoff Jun 21 '12 at 11:05