Skip to content

Instantly share code, notes, and snippets.

@chingovan
Created May 16, 2016 14:45
Show Gist options
  • Save chingovan/eeb6d3d66e6b5a56525eeb32a593957a to your computer and use it in GitHub Desktop.
Save chingovan/eeb6d3d66e6b5a56525eeb32a593957a to your computer and use it in GitHub Desktop.
<%@include file="/html/auinode/init.jsp"%>
<aui:row>
<aui:row>
<img src="<%= renderRequest.getContextPath() %>/images/cover.png" id="coverImageId"/>
</aui:row>
<aui:row>
<input type="button" id="toggleId" value="Toggle"/>
</aui:row>
</aui:row>
<aui:script>
AUI().use('aui-node', function(A){
var button = A.one('#toggleId');
button.on(
'click', function(){
var imageNode = A.one('#coverImageId');
imageNode.toggle();
}
);
});
</aui:script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment