2011-12-23 2 views
2

라이트 박스에 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">&nbsp;</div>'); 
    $(".jwbox").click(function() {$.jwbox.toggle(this); return false;}); 
    $("#jwbox_background").click(function() {$.jwbox.toggle(this); return false;}); 
    $(window).resize(function() {$.jwbox.center();}); 
}); 
+0

실례를 볼 수 있습니까? –

+0

에 길 찾기 링크가 추가되었습니다. – user874185

답변

0

솔루션 : 참조

// Assigning click events in elements to close overlay 
$('#jquery-overlay,#jquery-lightbox').click(function() { 
    _finish(); 
}); 

이 파일 검색에서 다음 다운로드 패키지

에서

사용 jquery.lightbox-0.5 파일을 모두 제거합니다.

관련 문제