라이트 박스에 jwplayer가 있고 그 안에 링크가 있습니다. 링크 중 하나를 클릭하면 라이트 박스가 닫히고 링크로 이동하지 않습니다. 마치 존재하지 않을 때 라이트 박스에 eventprevent 함수가있는 것처럼 ... 어떤 식 으로든 이것이 내 코드이다. 나는이 문제를 해결할 수있는 도움을 얻는다.내용을 클릭하면 라이트 박스가 닫힙니다.
감사
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();});
});
실례를 볼 수 있습니까? –
에 길 찾기 링크가 추가되었습니다. – user874185