Why I get an error when you run the script?

Trying to add to block another social. icon Tilda which is not in the script there is a bug in the console
Uncaught SyntaxError: missing ) after argument list

What's the problem?) Please tell me
$(".t451__right_social_links_wrap").prepend( "
<div class="t451__right_social_links_item">
 <a href="#">
 <img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2016/240/iconmonstr-whatsapp-1.png">
</a>
</div>
"); // < ---- there are even notes as the piece of code)))


Also, I tried the method .append!
The block request $(".t451__right_social_links_wrap") finds
June 10th 19 at 16:33
1 answer
June 10th 19 at 16:35
Solution
You have a problem in the quotes - you inside the double quotes insert text containing other double quotes. Bramlage it in single quotes and use + multiline content.
And view your console, it also indicates why the error occurs.
Yes, thank you! Total:
$(".t451__right_social_links_wrap").append( "<div class="t451__right_social_links_item"><a href="#"><img src="https://cdns.iconmonstr.com/wp-content/assets/preview/2016/240/iconmonstr-whatsapp-1.png"></a></div>" );
- Darby_Bernier commented on June 10th 19 at 16:38

Find more questions by tags jQueryJavaScript