Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

How to use image sprites with RadMenuItem ImageUrl

$
0
0
Hello Tom,

The method .findItemByValue("rmiBarUser") returns RadMenu item object, not a DOM element, so it has no .className property. A DOM element of an item can be accessed by the get_element() method. As Radmenu items DOM elements has also inbuilt CSS classes, we recommend to use jQuery .addClass() method instead of the .cssClass property:
function setCartIconFull() {
    var menu = $find("<%= rmTest.ClientID %>");
    var item = menu.findItemByValue("rmiBarAccount");
    $telerik.$(item.get_element()).addClass("isTest2");
}

We have noticed that there is no item with the "rmiBarUser" value in the markup that you provided in the first thread, so we give you this example with "rmiBarAccount" value.

Regards,
Magdalena
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 

Viewing all articles
Browse latest Browse all 94857

Trending Articles