dポイントプレゼントキャンペーン実施中!

私のxamppはscoopで入れたバージョン8.2.12-0でControl Panelはv3.3.0とあるのですが、
htdocs\dashboard\javascripts\all.js の5496行、" }); "が余ってSyntax Errorになります。
とっても、Syntax Errorがでます。
自分が入れたのか、最初からのバグが分かりませんが、正しくしたいです。
横の数字は行番号を合わせてあります。5446行からにしたのは、インデントがそうなっていたからです。

5446 $(document).foundation();
5447
5448
5449   // tweet it form
5450   $('form#tweet').submit(function(event) {
5451     window.open($(this).attr('action') + '?' + $(this).serialize(), '_blank', 'scrollbars=no,menubar=no,height=400,width=500,resizable=yes,toolbar=no,status=no');
5452     event.preventDefault();
5453   });
5454
5455   // substitute @2x images where available
5456   if (window.isRetina()) {
5457     console.log("loading retina images..");
5458     var replacement;
5459     $('img[data-2x]').each(function(i, img) {
5460       replacement = $(img).clone().attr('src', $(img).data('2x')) || img;
5461       // only replace once the replacement is loaded
5462       replacement.load(function() {
5463         $(img).replaceWith($(this));
5464       });
5465     });
5466   }
5467
5468   if (window.isLinux64) {
5469     $('a[data-x64-href]').each(function(i) {
5470       $(this).attr('href', $(this).data('x64-href'));
5471     });
5472   }
5473
5474   $('a[data-delayed-href]').click(function(event) {
5475     window.open($(this).data('delayed-href'), '_blank');
5476     window.location = $(this).attr('href');
5477     event.preventDefault();
5478   });
5479
5480   // FAQ accordions
5481   var panels = $('dl.accordion > dd').hide();
5482   var draws = $('dl.accordion > dt').css('cursor', 'pointer');
5483   draws.click(function() {
5484     panels.slideUp();
5485     var next = $(this).next()
5486     if (next.is(':hidden'))
5487       next.slideDown();
5488     return false;
5489   });
5490
5491   // Show section if anchor provided
5492   var anchor = window.location.hash;
5493   if(anchor !== ''){
5494     $('dl.accordion > dd' + anchor).show();
5495   }
5496 });

A 回答 (1件)

こんばんは



あまり使用してはいませんが、XAMPP 8.0.0、Control Panelはv3.2.4 での情報です。
どうするとエラーが発生するのかもわかりませんけれど・・・
(あまり使用してはいませんが、今のところエラーは出ません)

ご提示のスクリプトの範囲(5446行~5496行)で比較してみると、5454行(=空行)に違いがありました。
当方のファイルでは、インデントのスペースが残っています(あとは空行)。
その他の行に関しては、全く同じですね。
    • good
    • 0
この回答へのお礼

回答ありがとうございます。
PC再起動したらなぜだか、エラー表示しなくなりました。

お礼日時:2024/05/26 23:42

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!

このQ&Aを見た人はこんなQ&Aも見ています


このQ&Aを見た人がよく見るQ&A