leftMenu.html 684 Bytes
<!DOCTYPE html>
<div id="leftMenu">

</div>
<script>
	$(function() {
		
		$("#leftMenu").myTabs({
			fit : true
		});
		
		$.post(contextPath + "/loginController/getLoginUserMenu.do", function(data) {
			data = data.data;
			for (var key in data) {
				var div = $("<div>");
				div.myAccordion({
					fit : true,
					rootPid : 0,
					idField : "id",
					pidField : "parent_id",
					textField : "menu_name",
					dataList : data[key],
					onClickMenu : function(item, parent) {
						addTab(item);
					}
				});
				$("#leftMenu").myTabs("add", {
					title : key,
					content : div,
					cache : true
				});
			}
			$("#leftMenu").myTabs("select", 0);
			
		});
	})
</script>