This topic contains 1 reply, has 2 voices, and was last updated by Hristo 3 years, 9 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Navigation › Menu, Context Menu › get clicked menuitem by key/id instead of the text/label
Tagged: menu item key label
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 3 years, 9 months ago.
Thats my current Navigation menu
<div id='jqxMenu' class='menu'>
<ul>
<li>Statistiken
<li><a href="#ChartDemo">ChartDemo</a></li>
<li><a href="#TicketChartSimple">TicketChartSimple</a></li>
<li><a href="#TicketChartMulti">TicketChartMulti</a></li>
<li><a href="#TicketChartSupporter">TicketChartSupporter</a></li>
<li><a href="#TicketChartService">TicketChartService</a></li>
...
$("#jqxMenu").on('itemclick', function (event) {
switch ($(event.args).text())
{
case 'ChartDemo':
{
}
...
In each example I found, the clicked/selected menuitem was detected by the items text/label which is supposed to be multilingual (!)
Instead of the text I would like to reference a language independant key like the ID attribute
sometime like
<div id=’jqxMenu’ class=’menu’>
<li id=”CD2″>Statistik Demo2
…
$(“#jqxMenu”).on(‘itemclick’, function (event) {
switch ($(this).attr(‘id’))
{
case ‘CD’:
{
}
case ‘CD2’:
{
}
I didn’t found any example how to do it like this ?
Any ideas ? Thanks
Hello kagel,
You could get from the event particular target which is clicked.
Please, take a look at this example.
Best Regards,
Hristo Hristov
jQWidgets team
https://www.jqwidgets.com
You must be logged in to reply to this topic.