I have an accordion pane which has two classes one for selected header and other for non selected assigned to it. Both these classes have a background attribute which consists of an image. Both these images are different. Now I need to change the class of the accordion pane onmouseover and onmouseout events. These new classes will hav two different images. Below is my aspx change and the javascript function.
<aic:AccordionPane
HeaderCssClass="chevronSummaryHeader"
HeaderSelectedCssClass="chevronSummaryHeaderSelected"
ContentCssClass="chevronSummaryContent" runat="Server"
id="apWhatHappened" onmouseover="mouseover(this.id)" onmouseout="mouseout(this.id)">
<Header>
<div class="chevronSummaryHeaderText">
<aic:label ID="lblWhatHappened" runat="server" Text="{[Allstate.Claims.NextGen.CSS.Resources].GeneralFactsCR.WhatHappenedHeader}"></aic:label></div>
<aic:LinkButton ID="btnWhatHappened" Text="" runat="server" CssClass="summaryEditButton" />
</Header>
<Content>
<ql:QuestionList ID="ucWhatHappened" runat="server" EnableViewState="true" />
</Content>
</aic:AccordionPane>
function cancelBubble(e) { if(e.stopPropagation) e.stopPropagation(); e.cancelBubble = true; }
function mouseover(id)
{
if(id.className == "chevronSummaryHeader")
{
id.setAttribute("class", "chevronMouseOverSummaryHeader");
}
else if (id.className =="chevronSummaryHeaderSelected")
{
id.setAttribute("class", "chevronMouseOverSummaryHeaderSelected");
}
}
function mouseout(id)
{
if(id.className =="chevronMouseOverSummaryHeader")
{
id.setAttribute("class", "chevronSummaryHeader");
}
else if (id.className =="chevronMouseOverSummaryHeaderSelected")
{
id.setAttribute("class", "chevronSummaryHeaderSelected");
}
}
Now when I hover the mouse there is no change in the class of accordion pane. I am not getting what is going wrong.