-1

I've recently built a site that houses multiple videos. All was working well until yesterday, but I realized some of the clickable videos I have are no longer clickable.

I'm receiving the error, Uncaught SyntaxError: missing ) after argument list in multiple lines and was wondering how I could resolve the issue?

Here is the code for which I am receiving the error for -

    
    var myvideo30 = $("");
    
    $("#click30").click(function() {
        //Get rid of that old HTML content
        $("#video-slider").empty();
        
        //Bring in the new content!
        $("#video-slider").append(myvideo3);
    
        $("#paul-4")[0].load();
    
        $("#paul-4")[0].play();
    });     

There is also a snapshot of the code for reference here.

And the direct site can be accessed here.

Any advice and/or solutions are greatly appreciated, thank you very much!

2 Answers2

0

Um? Isn't it clear? JQuery import is missing, and all the errors are generated from JQuery statements.

I don't use JQuery much but I guess $ is used when you use JQuery.

enter image description here

Imtiyaz Shaikh
  • 425
  • 3
  • 7
0

Just read the doc, you cannot use jquery directly, you must wait for it to be loaded

$( document ).ready(function() {
    var myvideo30 = $("");
    
    $("#click30").click(function() {
        //Get rid of that old HTML content
        $("#video-slider").empty();
        
        //Bring in the new content!
        $("#video-slider").append(myvideo3);
    
        $("#paul-4")[0].load();
    
        $("#paul-4")[0].play();
    });
});

official documentation

Then the next error is generated here

var myvideo30 = $("<video id='paul-4' src='Caryatid (Duhaupas) (2016) - video loop.mp4' playsinline controls controlsList="nodownload" autoplay muted loop></video>");

Just replace double quote by simple around nodownload

farvilain
  • 2,552
  • 2
  • 13
  • 24
  • Thank you so much for your reply, I really appreciate it! What exactly do you mean by replace the double quote by simple around nodownload? – Lizette Ayala Nov 02 '20 at 17:48
  • I mean replace double quote by single quote around nodownload... so `"nodownload"` became `'nodownload'` ... – farvilain Nov 02 '20 at 17:56
  • I've just added and it fixed the issue entirely! Your help is much appreciated! Bless! – Lizette Ayala Nov 02 '20 at 18:06
  • You sill have to remove `` it is not working and jQuery is already include by anther line, from cloudflare. Not a blocking bug but producing error logs. Also a bug in `function showDivs` – farvilain Nov 02 '20 at 18:31