javascript - Adding html to the DOM using jQuery -


i need attach string html dom using jquery:

i have html string:

 var html = "<div id="inspectormenu" style="display: none;">"+             "<label id="showinspectorname"  style="padding: 13px 09px; color:white"></label>"+             "<ul id="" class="nav pull-left">"+             "<li style="display: inline-block;text-align: center; max-height:35px;"><a class="navbar-brand" ui-sref="sites.list" style="padding: 11px 09px;" title="אתרים"><i class="glyphicon glyphicon-tree-conifer"></i></a></li>"+             "<li style="display: inline-block;text-align: center;max-height:35px;"><a class="navbar-brand" ui-sref="sitesdamages.siteslist" style="padding: 11px 09px;" title="אירועים"><i class="glyphicon glyphicon-exclamation-sign"></i></a></li>"+             "</ul>"+             "</div>" 

and have html code:

    <div class="navbar-header">         <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">             <span class="icon-bar"></span>             <span class="icon-bar"></span>             <span class="icon-bar"></span>         </button>         @html.actionlink("sites maintaice", "index", "dashboard", new { area = "" }, new { @class = "navbar-brand" })    //===========i need add html string here!!!==============//      </div> 

using jquery need add html string between </div> tag , @html.actionlink .

any idea how can implement it?

to insert html after markup generated @html.actionlink, @ end of div, can append

$(".navbar-header").append(html); 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -