I want to build this DIV with unordered list using jquery for a menu and the data would be coming from a sharepoint list. I have the main DIV on the area where i want the menu
<div id="menumain"/>
I have tried doing the below but not too good with JQUERY. I want to append or add the below DIV to the DIV mainmenu element above Any help will be appreciated
$("#menumain").find('div')
.append($('<ul>')
.append($("<li><a href=>" + $(this).attr("ows_Group") + "</a></li>")
.append($('</ul>')
)
)
);
<div id="header">
<ul id="navbar">
<li class="menu"><a href="#">Home</a>
<ul>
<li><a href="#">Menu item 1</a></li>
<li><a href="#">Menu item 2</a></li>
<li><a href="#">Menu item 3</a></li>
<li><a href="#">Menu item 4</a></li>
<li><a href="#">Menu item 5</a></li>
</ul>
</li>
</ul>
</div>