Thank you for your message.
It is not that easy for the CMSMenu web part. You would have to edit source code so please open the
cmsmenu.ascx.cs file in the
\CMSWebParts\Navigation\ directory and paste into it following method:
/// <summary>
/// Render override
/// </summary>
protected override void Render(HtmlTextWriter writer)
{
if (this.StopProcessing)
{
base.Render(writer);
}
else
{
StringBuilder sb = new StringBuilder();
Html32TextWriter mwriter = new Html32TextWriter(new System.IO.StringWriter(sb));
base.Render(mwriter);
// CSubmenuElem1 or CSubmenuElem - depends, how many manus you have on page
string htmlcode = Regex.Replace(sb.ToString(), "onclick=\"CSubmenuElem1[^\"]*\"", "onclick=\"this.className = 'CMSMenuHighlightedMenuItem'; return(false);\"");
writer.Write(htmlcode);
}
}
Don't forget link appropriate libraries.
You just have replaced onclick function in this menu with your custom one.
Best regards,
Jan Hermann