JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<div id="calendarCheckboxWrapper">
<p><strong>Select your calendars:</strong></p>
<label id="cal0Label"><input checked="checked" name="Checkbox" type="checkbox" value="cal0" /> Category 0</label><br>
<label id="cal1Label"><input checked="checked" name="Checkbox" type="checkbox" value="cal1" /> Category 1</label><br>
<label id="cal2Label"><input checked="checked" name="Checkbox" type="checkbox" value="cal2" /> Category 2</label><br>
<label id="cal3Label"><input checked="checked" name="Checkbox" type="checkbox" value="cal3" /> Category 3</label>
</div>
<div id="calendarButton">
<button class="noPrint calPrintBtn" onclick="myFunction()">Print Calendar</button>
</div>
<div id="calendarPlaceholder">
<p>Your calendar feed will display here.</p>
</div>
/******************************
**** AMR EVENT LIST STYLES ****
******************************/
/* Hide Event Excerpt */
#events_wrap > table > tbody > tr > td > div.excerpt {
display: none;
}
/* Hide Event Duration */
#events_wrap > table > tbody > tr > td > div.duration {
display: none;
}
/* Set Day Background Color*/
#events_wrap > table > tbody > tr.trigger.group.Day {
background: #f2f2f2;
}
#events_wrap > table > tbody > tr > td > div > a {
font-weight: 600;
}
/* Change Event Location to Italic */
#events_wrap > table > tbody > tr > td > div.location {
font-style: italic;
}
/* Reduce padding for each line */
#events_wrap table.ical th, #events_wrap table.ical td, #events_wrap table.ical tr {
padding: 4px 0px 4px 0px;
}
/* Set color for Calendar 0 Events */
#cal0Label, .cal0 > td > div > a{
color: #891f03;
font-weight: 600;
padding-left: 4px;
}
/* Set color for Calendar 1 Events */
#cal1Label, .cal1 > td > div > a{
color: #29623e;
font-weight: 600;
padding-left: 4px;
}
/* Set color for Calendar 2 Events */
#cal2Label, .cal2 > td > div > a{
color: #39a0bf;
font-weight: 600;
padding-left: 4px;
}
/* Set color for Calendar 3 Events */
#cal3Label, .cal3 > td > div > a{
color: #e7a723;
font-weight: 600;
padding-left: 4px;
}
/******************************
******** CONTROL STYLES *******
******************************/
#calendarCheckboxWrapper {
margin: 20px;
}
#calendarPlaceholder{
text-align: center;
width: 100%;
max-width: 480px;
padding: 60px;
border: 1px solid #666;
margin: 20px;
}
#calendarButton{
margin: 20px;
}
.calPrintBtn {
color: #444;
background: #fff;
font-family: helvetica, arial, sans;
font-size: 14px;
font-weight: 400;
padding: 6px 12px;
border: 1px solid #444;
border-radius: 4px;
transition: all 0.2s ease;
}
button:hover{
color: #008800;
border-color: #008800;
}
/******************************
********* PRINT STYLES ********
******************************/
@media print {
/* Genereic class to assign to items I don't want printed */
.noPrint {
display: none;
}
/* Items found on the page that I don't want to print but can't assign a class to. Use your page number in place of 12345 */
.page-id-12345 #sidebar, .page-id-12345 #main-header, .page-id-12345 #main-footer, .page-id-12345 #events_wrap > div.calendar_navigation, .page-id-12345 .entry-title{
display: none;
}
}
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('input[type="checkbox"]').click(function(){
var inputValue = $(this).attr("value");
$("." + inputValue).toggle();
});
});
</script>
<script>
function myFunction() {
window.print();
}
</script>
Also see: Tab Triggers