How to change an inline style of an item selected dynamically.
How can I change the image of an item when I hover on that item. Should I do this in CSS class or clientside. Would you please send me a sample.?
<ig:WebDataMenu ID="WebDataMenu1" runat="server"><Items><ig:DataMenuItem ImageUrl="../images/menu_whatsnew.gif" /><ig:DataMenuItem ImageUrl="../images/menu_software.gif">
</ig:DataMenuItem></Items></ig:WebDataMenu>
When I hover on menu_whatsnew.gif, it should change the image to some other image i specify.
Its just like the previous version of UltraWebMenu which has the nice property HoverImageUrl
<ignav:Item TargetUrl="" TagString="whatsnew" HoverImageUrl="~/images/menu_whatsnew_h.gif" ImageUrl="~/images/menu_whatsnew.gif" ToolTip="" TargetFrame="" CssClass="" Text=""> <Images> <DefaultImage Url="~/images/menu_whatsnew.gif" /> <HoverImage Url="~/images/menu_whatsnew_h.gif" /> </Images> </ignav:Item>
Please help.! Thank you
-Isaac
This can be handled ItemSelected client side event:
function WebDataMenu1_ItemSelected(sender, eventArgs){ ///<summary> /// ///</summary> ///<param name="sender" type="Infragistics.Web.UI.WebDataMenu"></param> ///<param name="eventArgs" type="Infragistics.Web.UI.DataMenuItemCancelEventArgs"></param> eventArgs.getItem().get_element().style.backgroundColor = 'red';}
eventArgs.getItem().get_element().style.backgroundColor = 'red';}