私はこのコードを書いていないので、最初に次のエラーが発生する理由を理解するのに苦労していますe.preventDefault()
。そのコードをイベント ハンドラー内で移動し.click
、 に渡しfunction(e){}
、 に置き換えreturn false
、宣言しようとしましたvar e = $(this.href)
(笑わないでください。学習しようとしています)。 で返される値を確認しましたa href
。正しい を返しますhash
。ビデオは再生されますが、IE デバッガーを実行するとこのエラーが発生します。誰かがこれを適切にデバッグして修正する方法を教えてください。ありがとう
HTML
<a href="#video1" class="blueBtn modal" style="width:150px;"><span>Watch Video <img width="10" height="17" src="images/bluebtn.png"></span></a></div>
Javascript
// FANCY BOX
$("a.modal").click(function(){
var inline=$(this).attr('href');
$.fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none',
'href' : inline,
'onComplete' : function(){
$(inline+' .flowPlayer').videoPlayer();
$.fancybox.center(true);
},
'onClosed' : function(){loc();}
});
e.preventDefault();
});
$(".print").click(function(e){
window.open("print-docs/"+$(this).parent().attr('id')+".html","print","width=1,height=1");
e.preventDefault();
});
function loc(){
var location=window.location.href;
var replaceHash=location.replace(document.location.hash,"");
window.location.assign(replaceHash);
}