J'ai une lightbox avec jwplayer à l'intérieur et j'ai aussi des liens avec elle, le problème est que lorsque je clique sur l'un des liens, il ferme la boîte à lumière et ne va jamais au lien, presque comme s'il y avait une fonction eventprevent sur la boite à lumière quand il n'y en a pas ... N'importe comment c'est mon code J'apprécie toute aide que je peux obtenir pour résoudre ce problème.Lightbox se ferme lorsque vous cliquez sur le contenu
Merci
jQuery.fn.center = function() {
this.css("position","fixed");
this.css("top", ($(window).height() - this.outerHeight())/2 + "px");
this.css("left", ($(window).width() - this.outerWidth())/2 + "px");
return this;
}
jQuery.jwbox = {
lightbox : null,
player : null,
toggle : function(context) {
if (!$.jwbox.lightbox) {
$.jwbox.lightbox = $(".jwbox_hidden", context);
$.jwbox.center();
$("#jwbox_background").fadeIn("fast");
$.jwbox.lightbox.css("display","block")
$.jwbox.center();
$("#jwbox_background").fadeTo(0, 0.8);
$("object", context).each(function(){
$.jwbox.player = document.getElementById(this.id);
});
} else if ((context.className == 'jwbox_content')) {
} else {
try {
$.jwbox.player.sendEvent("STOP");
$.jwbox.player = null;
} catch (err) {
}
$.jwbox.lightbox.css("display","none");
$.jwbox.lightbox = null;
$("#jwbox_background").fadeOut("fast");
}
},
center : function() {
if ($.jwbox.lightbox) {
$.jwbox.lightbox.center();
}
}
}
$(document).ready(function() {
$("body").append('<div id="jwbox_background"> </div>');
$(".jwbox").click(function() {$.jwbox.toggle(this); return false;});
$("#jwbox_background").click(function() {$.jwbox.toggle(this); return false;});
$(window).resize(function() {$.jwbox.center();});
});
Puis-je voir un exemple de travail? –
a ajouté un lien avec les directions – user874185