function doSomething(el) { $.post("sendHtml.php", { "username": "v_username" }, function (data) { $(el).next().append(data); }, "html"); } <?php $html = '<div class="submenu show-submenu" [class]="(level_1_0 ? \'submenu show-submenu\' : \'submenu show-submenu\') + \' \' + (hideSecondary ? \'hide-parent\' : \'\')" role="menu" aria-label="New">'; $html .= ' <div class="controls" [class]="hideSecondary ? \'controls hide-parent\' : \'controls\'" aria-label="New controls">'; $html .= ' <a tabindex="0" role="button" on="tap:AMP.setState({level_1_0: !level_1_0, hidePrimary: !hidePrimary})" aria-label="Return to Menu"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">'; $html .= ' <path d="M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z" />'; $html .= ' </svg> </a>'; $html .= ' <span class="truncate">New</span>'; $html .= ' <a tabindex="0" role="button" on=\'tap:header-sidebar.toggle\' aria-label="Close New"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">'; $html .= ' <path d="M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z" />'; $html .= ' </svg> </a>'; $html .= ' </div>'; $html .= ' <button class="link-container view-all truncate" title="New">'; $html .= ' View All News'; $html .= ' </button>'; $html .= '</div>'; echo $html; ?>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter