0

外部の .js ファイルであらゆる種類の関数を作成しようとしているので、コーディングを減らして Edge でそれらを複数回呼び出すことができます。問題は、jQuery と外部 Javascript ファイルをインポートした後、一部のコードが機能することですが、この部分で行き詰まります。シンボルの .css プロパティ、より具体的には「font-size」プロパティを変更することです。私の現在の機能は次のとおりです。

function setFont(textid,fontsize,originalWinWidth){ 
//textid: symbol's name; fontsize: current font size of this symbol; originalWinWidth:
//window size at the start of the animation

console.log("Set Font:");

//set the original font size
var originalFontSize = Math.round(originalWinWidth/fontsize);
console.log("Original Font Size: " + originalFontSize);
console.log("Text ID: " + textid);

//set the font size using jquery
sym.$(textid).css("font-size", originalFontSize);  
} 

最後の行に「イベント ハンドラで Javascript エラーが発生しました! イベント タイプ = 要素」というエラーが表示されますが、コードの他のすべての部分は機能します。これが何であるか考えていますか?

ありがとう、

ラファエル・カリニャート

4

0 に答える 0