[
https://issues.apache.org/jira/browse/WICKET-4825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13480711#comment-13480711
]
vineet semwal commented on WICKET-4825:
---------------------------------------
comment target.add( wmc ) and you will see the correct behavior .what exactly
went wrong is when you do ajax refresh,the css class at client becomes
"expandable" which your script changes to "expanded" and hence the expanded
appears stuck to user or to the eyes.
> Odd Javascript behavior with 6.1.1
> ----------------------------------
>
> Key: WICKET-4825
> URL: https://issues.apache.org/jira/browse/WICKET-4825
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 6.1.1
> Reporter: Nick Pratt
> Attachments: quickstart.tar.gz
>
>
> See attached quickstart. I expect the <div> to toggle colors between red and
> green on every click. This doesnt happen (latest Chrome browser). The panel
> only toggles color on the first click.
> Issuing the returned javascript directly in Chrome's dev tools correctly
> toggles the panel colors as expected:
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id="wmc" wicket:id="wmc" class="expandable">Click Me</div>]
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id="wmc" wicket:id="wmc" class="expanded">Click Me</div>]
> $('#wmc').toggleClass('expanded').toggleClass('expandable');
> [<div id="wmc" wicket:id="wmc" class="expandable">Click Me</div>]
> Looking really closely at the element inspector in Chrome, it looks like the
> panel's class attributes do get toggled but then they seem to get overwritten.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira