4 examples of 'javascript insertadjacenthtml' in JavaScript

Every line of 'javascript insertadjacenthtml' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
18function insert() {
19
20 var corner = '<a target="_blank" href="https://pride.codes"> Created with Sketch. </a> ';
21
22 var css =
23 '@media only screen and (min-width: 768px) {' +
24 '#pridecodes-code-corner-svg {width: 100px;}' +
25 '} @media only screen and (max-width: 767px) {' +
26 '#pridecodes-code-corner-svg {width: 50px;}' +
27 '}' +
28 '#pridecodes-code-corner-svg { animation: enterIn 2s; }' +
29 '@keyframes enterIn {0% {opacity: 0;}100% {opacity: 100;}}' +
30 '#pridecodes-code-corner-svg { transition: all .2s ease-in-out; }' +
31 '#pridecodes-code-corner-svg:hover { transform: scale(1.1); transform-origin:right top;}';
32
33 var style = document.createElement('style');
34 style.innerHTML = css;
35
36 document.body.insertAdjacentHTML( 'beforeEnd', corner );
37 document.body.appendChild(style);
38
39}
47function insertScript() {
48 window.urlfix_groupID = document.URL.replace(/^.+id=/,'').replace('#', '');
49 window.urlfix_groupSite = window.urlfix_grouplist[window.urlfix_groupID];
50 window.urlfix_openSuggBox = function(){var suggboxurl = "http://mufix.herokuapp.com/form?group=" + urlfix_groupID; if(urlfix_groupSite !== "undefined") suggboxurl += "&amp;update=yes"; window.open(suggboxurl, '', 'scrollbars=no,resizable=yes, width=700,height=200,status=no,location=no,toolbar=no');};
51 var urlfix_site = document.createElement('tr');
52 urlfix_site.innerHTML = '<td><u>Site</u><a href="#"> (Suggest an update)</a></td><td><a target="_blank" href="' + urlfix_groupSite + '"><u>' + urlfix_groupSite + '</u></a></td>';
53 var urlfix_irc_par = document.getElementById("fixed_irc_url").parentNode;
54 urlfix_irc_par.parentNode.insertBefore(urlfix_site, urlfix_irc_par.nextSibling);
55}
416value: function insert(content) {
417 var toChildNode = arguments.length &gt; 1 &amp;&amp; arguments[1] !== undefined ? arguments[1] : false;
418
419 if (toChildNode) {
420 this.elementContainer.lastChild.insertAdjacentHTML("beforeend", content);
421 } else {
422 this.elementContainer.insertAdjacentHTML("beforeend", content);
423 }
424
425 this.contents(this.contents().split("").join(""));
426}
5function adxinserthtml(o, w, t) {
6 o.insertAdjacentHTML(w, t)
7}

Related snippets