4

I have a Dynamnic based Radmenu with dropdown menus.

I want a user to click an image on the site(not the menu) and then it automatically triggers the dropdown menu to appear from the Telerik menu with jQuery. Is this possible?

Client side HTML after site is loaded:

<div id="ctl00_RadMenu1" class="RadMenu RadMenu_Hay rmSized" style="width: 960px; left: 0px; top: 0px; z-index: 10000; ">
    <ul class="rmRootGroup rmHorizontal">
        <li class="rmItem rmFirst">
            <a href="http://test.com" class="rmLink rmRootLink"><span class="rmText rmExpandDown">Test Dropdown 1</span></a>
            <div class="rmSlide">
                <ul class="rmVertical rmGroup rmLevel1">
                    <li class="rmItem rmFirst">
                        <a href="http://test.com" class="rmLink"><span class="rmText">Dropdown Item 1</span></a>
                    </li>
                </ul>
            </div>
        </li>
    </ul>
</div>
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
the sandman
  • 1,019
  • 3
  • 12
  • 32

2 Answers2

2

I think you are looking for this...

$('#theImage').click(function(){
    var menu = $find("<%= RadMenu1.ClientID %>");
    var item = menu.findItemByText('Test Dropdown 1');
    if (item) {
        item.open();
    } else {
        alert('the item ' + text + ' was not found');
    }
});

You can read more about this here : http://www.telerik.com/help/aspnet-ajax/menu-client-side-basics.html

teewuane
  • 5,524
  • 5
  • 37
  • 43
0

you can try trigger of jquery http://api.jquery.com/trigger/

 $(".rmLink").trigger('click');
rajesh kakawat
  • 10,826
  • 1
  • 21
  • 40