EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 17, 2024, 06:57:42 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
[SOLVED] menuButton add items
Pages: [
1
]
« previous
next »
Print
Author
Topic: [SOLVED] menuButton add items (Read 3734 times)
jega
Full Member
Posts: 191
[SOLVED] menuButton add items
«
on:
October 26, 2018, 02:03:23 AM »
Hi
Need to add more items to a menu after loading the page.
<div id="menuList" class="easyui-panel menuBox" style="width:100%;padding:5px">
<a id="pub" href="javascript:void(0)" class="easyui-menubutton" data-options="menu:'#menu_docs',iconCls:'icon-documents',plain:true">Documents</a>
</div>
<div id="menu_docs" class="easyui-menu">
<div onclick="window.open('doc_default.pdf','_blank')">Default document</div>
</div>
Getting a filelist from server folder
$.each(filesData, function(index, element){
var dataTag = '<div onclick="window.open('+element.filename+')"></div>';
$('#menu_docs').append(dataTag);
});
But can't see it in the menu
Any help ??
Regards
Jesper
«
Last Edit: October 27, 2018, 01:33:14 AM by jega
»
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: menuButton add items
«
Reply #1 on:
October 26, 2018, 06:55:09 PM »
Please call 'appendItem' method to append menu items. Please refer to this documentation
https://www.jeasyui.com/documentation/menu.php
Logged
jega
Full Member
Posts: 191
Re: menuButton add items
«
Reply #2 on:
October 27, 2018, 01:32:53 AM »
Why didn't i see that.
Thanks
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...