Skip to content

Instantly share code, notes, and snippets.

@ChuckJonas
Created October 11, 2016 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChuckJonas/e49117927ba9550f4dcafc792eed0a00 to your computer and use it in GitHub Desktop.
Save ChuckJonas/e49117927ba9550f4dcafc792eed0a00 to your computer and use it in GitHub Desktop.
function setColor(){
document.getElementById("greeting").className = "red";
}
<apex:page showHeader="false" sidebar="false" applyBodyTag="false">
<header>
<apex:outputPanel layout="none" rendered="{!$Label.Toggle_Local_Dev == '1'}">
<apex:stylesheet value="https://localhost:8080/statictesting.resource/styles.css"/>
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!$Label.Toggle_Local_Dev != '1'}">
<apex:stylesheet value="{!URLFOR($Resource.StaticTesting, 'styles.css')}"/>
</apex:outputPanel>
</header>
<body>
<div id='greeting'>
<h1 onclick="setColor();">Hello World</h1>
</div>
<apex:outputPanel layout="none" rendered="{!$Label.Toggle_Local_Dev == '1'}">
<apex:includeScript value="https://localhost:8080/statictesting.resource/actions.js"/>
</apex:outputPanel>
<apex:outputPanel layout="none" rendered="{!$Label.Toggle_Local_Dev != '1'}">
<apex:includeScript value="{!URLFOR($Resource.StaticTesting, 'actions.js')}"/>
</apex:outputPanel>
</body>
</apex:page>
.red{
color:red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment