2011-12-23 8 views
2

ライトボックスにjwplayerがあり、リンクも表示されていますが、リンクの1つをクリックするとライトボックスが閉じ、リンクには絶対に移動しませんあたかもライトボックスに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ファイルとそれをすべて削除します。

関連する問題