[ 1 post ]

RudyCox

  • Username: psxtekno
  • Joined: Mon Sep 26, 2011 5:06 am
  • Posts: 4
  • Offline
  • Profile
Tags:

menubar - set menuitem to disabled

Post Posted: Mon May 14, 2012 8:53 am
+0-
Hi, how can I change a menuitem status to disabled after the menubar is rendered?

for istance I would like to disable the menuitem: test2

I tried
YAHOO.widget.MenuManager.addMenu('xMenu')
xMenu.getMenuItem('test2').cfg.setProperty("disabled", true);
but dows't work

thankyou in advance for any answer

Rudy


this is the menubar
Code:
<div id="mainmenu" class="yuimenubar yuimenubarnav">
                            <div class="bd">
                                <ul class="first-of-type">
<li class="yuimenuitem"><a class="yuimenuitemlabel" href="#">TEST</a>
                                                   
                                                        <div id="consenso" class="yuimenu">
                                                            <div class="bd">
                                                                <ul class="first-of-type">
                                                                <li class="yuimenuitem" id="test1"><a class="yuimenuitemlabel" onclick="alert('stoka')"  >TEST1</a></li>
                                                                <li class="yuimenuitem" id="test2"><a class="yuimenuitemlabel" onclick="" >TEST2</a></li>
                                                                <li class="yuimenuitem" id="test3"><a class="yuimenuitemlabel" onclick="" >TEST3</a></li>
                                                                 </ul>
                                                               </div>
                                                           </div>
                                     </li>
  </ul>
                            </div>
                           
</div>

this is the script
Code:
xMenu = new YAHOO.widget.MenuBar("mainmenu", {
                                                        position: "absolute",
                                                        hidedelay:  750,
                                                        lazyload: true //proprietà specificata solo nel menu.js
                                          });
               xMenu.render('mydiv');
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum