Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

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.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <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>
              
            
!

CSS

              
                /******************************
**** 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;
	}
}

              
            
!

JS

              
                <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>
              
            
!
999px

Console