EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
January 06, 2026, 10:41:20 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]Change text in menu item by ID
Pages: [
1
]
« previous
next »
Print
Author
Topic: [SOLVED]Change text in menu item by ID (Read 115 times)
jega
Full Member
Posts: 234
[SOLVED]Change text in menu item by ID
«
on:
January 03, 2026, 06:43:07 AM »
Looking for a way to change the text dynamicaly
<div id="menu_setup" class="easyui-menu">
<div id="upload" data-options="iconCls:'icon-upload'">
<span>(1) Upload</span>
<div>
<div id="objID" data-options="iconCls:'icon-imageupload'">TEXT TO CHANGE</div>
</div>
</div>
</div>
Tried $('#objID').html('Changed text') and $('#objID').text('Changed text') whiuch both change the text but now there is no icon class and text starts from icon place. See attachement
Happy New Year
Jesper
«
Last Edit: January 04, 2026, 04:18:49 AM by jega
»
Logged
jega
Full Member
Posts: 234
Re: Change text in menu item by ID
«
Reply #1 on:
January 03, 2026, 04:16:02 PM »
Found solution
var item = $('#menu_setup').menu('findItem', {id:'objID'});
$('#menu_setup').menu('setText', {
target: item.target,
text: 'New Text'
})
Or if you want så search by name
var item = $('#menu_setup').menu('findItem', {name:'xxx'});
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...