根本にたどり着けない信じられないほど奇妙な問題を抱えています。
私は自分のファイルを持っています: main.js は適切にロードされ、コードで実行されます:
$(function() {
$('.navigation a').click(function(ev) {
currentTab = $(this).find('.active');
newTab = $(this).attr('name');
$('.active').removeClass('active');
$(this).addClass('active');
});
});
これは完璧に機能します。しかし、コードを次のように変更すると:
$(function() {
$('.navigation a').click(function(ev) {
currentTab = $(this).find('.active');
newTab = $(this).attr('name');
newTab = $(this).attr('name');
newTab = $(this).attr('name');
newTab = $(this).attr('name');
newTab = $(this).attr('name');
$('.active').removeClass('active');
$(this).addClass('active');
});
});
ブラウザからファイルを直接表示すると、次のように戻ります。
$(function() { $('.navigation a').click(function(ev) { currentTab = $(this).find('.active'); newTab = $(this).attr('name'); console.log(currentTab); console.log(currentTab); console.log(currentTab); $('.active').removeClass('active'); $(this).addClass('active'); });});
������������������������������������������������������������������������������
次のコンソール ログ エラーで:
Uncaught SyntaxError: Unexpected token ILLEGAL (行 2)
それは完全に機能しますが、特定の数の行を分割すると、破損して古いキャッシュファイルに戻ります。私自身のテストから、ファイルが合計 12 行であれば機能します。12 を超えると、上記のように壊れます。
私はもう試した:
CTRL + F5
シークレット
3つの異なるブラウザ
2 つの IDE
コンピューターを再起動しました
キャッシュをクリアし、キャッシュを無効にしました。
絶対に負けました、何か提案はありますか?お時間をいただきありがとうございます。