title: How to add multiple HTML code using $("body").append() in jQuery?
body: <p>I am trying to make a bookmarklet using jQuery, but I am getting a syntax error while appending multiple HTML commands in the body using $("body").append(" "); Is  there any other way to append multiple HTML commands using jQuery? </p>
  
  <p>Actually, I was making this Bookmarklet in reference to a tutorial: <a href="https://www.smashingmagazine.com/2010/05/make-your-own-bookmarklets-with-jquery/" rel="nofollow">https://www.smashingmagazine.com/2010/05/make-your-own-bookmarklets-with-jquery/</a></p>
  
  <p>I am even sending the code for the bookmarklet:</p>
  
  <h1>bookmarklet.js</h1>
  
  <pre><code>(function () {
  
      var v = "1.3.2";
  
      if (window.jQuery === undefined || window.jQuery.fn.jquery &lt; v) {
          var done = false;
          var script = document.createElement("script");
          script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js";
          script.onload = script.onreadystatechange = function () {
              if (!done &amp;&amp; (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) {
                  done = true;
                  initMyBookmarklet();
              }
          };
          document.getElementsByTagName("head")[0].appendChild(script);
      } else {
          initMyBookmarklet();
      }
  
      function initMyBookmarklet() {
          (window.myBookmarklet = function () {
              function getSelText() {
                  var s = '';
                  if (window.getSelection) {
                      s = window.getSelection();
                  } else if (document.getSelection) {
                      s = document.getSelection();
                  } else if (document.selection) {
                      s = document.selection.createRange().text;
                  }
                  return s;
              }
              if ($("#wikiframe").length == 0) {
                  var s = "";
                  s = getSelText();
                  if (s == "") {
                      var s = prompt("Forget something?");
                  }
                  if ((s != "") &amp;&amp; (s != null)) {
                      $("body").append("&lt;div id='wikiframe'&gt;
                                        &lt;div id='wikiframe_veil' style=''&gt;
                                        &lt;p&gt;Loading...&lt;/p&gt;
                                        &lt;/div&gt;
                                        &lt;iframe src='http://en.wikipedia.org/w/index.php?&amp;search=" + s + "' onload=" $('#wikiframe iframe').slideDown(500); "&gt;Enable iFrames.&lt;/iframe&gt;
                                      &lt;style type='text/css'&gt;
                                                      #wikiframe_veil { display: none; position: fixed; width: 100%; height: 100%; top: 0; left: 0; background-color: rgba(255,255,255,.25); cursor: pointer; z-index: 900; }
                                                      #wikiframe_veil p { color: black; font: normal normal bold 20px/20px Helvetica, sans-serif; position: absolute; top: 50%; left: 50%; width: 10em; margin: -10px auto 0 -5em; text-align: center; }
                                                      #wikiframe iframe { display: none; position: fixed; top: 10%; left: 10%; width: 80%; height: 80%; z-index: 999; border: 10px solid rgba(0,0,0,.5); margin: -5px 0 0 -5px; }
                                      &lt;/style&gt;
                                      &lt;/div&gt; "); //the append tag ends here, but the browser is showing syntax error on appending multiple HTML codes
                      $("#wikiframe_veil").fadeIn(750);
                  }
              } else {
                  $("#wikiframe_veil").fadeOut(750);
                  $("#wikiframe iframe").slideUp(500);
                  setTimeout("$('#wikiframe').remove()", 750);
              }
              $("#wikiframe_veil").click(function (event) {
                  $("#wikiframe_veil").fadeOut(750);
                  $("#wikiframe iframe").slideUp(500);
                  setTimeout("$('#wikiframe').remove()", 750);
              });
          })();
      }
  
  })();
  </code></pre>
  
  <p>So is there any way to get rid of this error. I hope my question is clear enough. Thanks in advance!</p>