cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div id="frame">
        <h1 id="header"><span>Introduction to jQuery</span></h1>
        <h2 id="subheader"><span>Training On-Demand!</span></h2>
        <div id="contentframe">            
            <div class="content">
                <span class="author">J. Michael Palermo IV</span><h2>Getting Started!!!</h2><img alt="Palermo 4" src="http://www.palermo4.com/image.axd?picture=2012/11/palermo4_bw.png" class="contentImage" />
                <p>
                    This html "template" page will be used to demonstrate the core features of jQuery.  jQuery is a JavaScript framework. jQuery is designed to change the way that you write JavaScript! It is no surprise that the jQuery motto is:
                </p>
                <blockquote>"write less, do more."</blockquote>
                <p>
                    Before you start developing with jQuery, you should be comfortable developing with the following technologies:                    
                </p>
                <ul>
                    <li>HTML</li>
                    <li>CSS</li>
                    <li>JavaScript</li>
                </ul>
            <p><span id="go" class="action">Go!</span></p><div id="output"></div></div><!--.content-->
            <div id="footer">
                <p>Copyright &copy;. Don't steal anything, etc.</p>
            </div><!--#footer-->
        </div><!--#contentframe-->
        <div id="navframe">
            <div id="entry">
                <form><fieldset>
                    <legend>Enter your e-mail address</legend>
                    <div><input id="email" name="email" type="text" /></div>
                    <div><button id="process" name="process">Process</button></div>
                </fieldset></form>
            </div>
            <div id="navigation">
                <h2>Menu</h2>
                <ul><li><a href="#" title="Home Page">Home</a></li>
                    <li><a href="#" title="Demonstrations with all the code!">Demos</a></li>
                    <li><a href="#" title="Read our blah, blah, blah...">Blogs</a></li>
                    <li><a href="#" title="Who are we?">About Us</a></li>
                    <li><a href="#" title="Let's do lunch...">Contact Us</a></li>
                </ul>
            </div><!--#navigation-->
            <div id="callout">
                <h2>More Information</h2>
                <p>For more information regarding this exciting topic, please check out the <!-- jQuery link --><a href="https://www.jquery.com">jQuery.com web site</a>...</p>
            </div>
        </div>
    </div>
            
          
!
            
              /* Basic HTML Element Style */
body {
	background-color: #FFFFFF;
	font: 11px/16px tahoma, verdana, arial, sans-serif;
	text-align: center;
}

h1 {
	font: bold 24px Tahoma, Verdana, Arial, Helvetica, sans-serif;
	margin:0 0 0 30px;
	color: #FFFFFF;
	word-spacing: normal;
	letter-spacing: .65em;
	text-align: left;
	background-color: #8CAAE6;
	border: 4px double #6487DC;
}
h2 {
	font: normal 10px Tahoma, Verdana, Arial, Helvetica, sans-serif;
	padding: 0 0 10px 0;
	margin:0 0 0 30px;
	text-align: right;	
}

#subheader 
{
    color: #333333;
    padding-right: 5px;
}

h3 {
	font: 18px georgia, 'times new roman', sans-serif;
}
h4, h5 {
	font: italic normal 11px verdana, tahoma, arial, sans-serif;
	margin: 0px;
}
a:link { 
	text-decoration:none; 
	color: #3333FF;
	}
a:visited { 
	text-decoration:none; 
	color: #660000;
	}
a:hover, a:active { 
	text-decoration: underline; 
	color: #6699FF;
	}

/*Structural elements */

#frame {
	width:680px;
	text-align:left;
	margin-left:auto;
	margin-right:auto;
		}
#contentframe {
	margin: 3px 40px 0px 200px;
	padding:0 15px;
	width: 460px;
	
}

#footer {
	font: 10px Tahoma, Verdana, Arial, Helvetica, sans-serif;
	border: 1px solid #e3e4e0;
	padding: 2px;
	margin-top: 10px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 0px;
}

#footer p{
	padding: 2px;
	margin-top: 2px
}

.content h2 {
	font: bold 12px verdana, tahoma, arial, sans-serif;
	padding: 0 0 5px 0;
	margin: 0 0 10px;
	border-bottom:1px solid #6487DC;
	text-align: left;
}

#navframe {
	position: absolute;
	top: 0px;
	padding: 70px 0 0 0;
	margin:0 0 0 30px;
	width:165px;

	text-align: left;
}

#navframe h2 {
	text-align: left;
	border: 1px solid #6487DC;
	margin: 0px 0px 0px 0px;
	padding: 0px 0px 0px 2px;
	background-color: #C7D8FA;
	font-size: 12px;
}


#navigation ul 
{
    list-style-type: none;   
    padding: 0px 0px 0px 5px;
}

.secret 
{
    position: absolute;
    text-align: center;
    font-size: large;
    border: 1px solid #DDE2FF;
	color: #FFFFFF;
	background-color: #FF4444;
	padding-right: 2px;
	padding-left: 2px;
	padding-top: 5px;
	padding-bottom: 5px;
}

#callout
{
    margin-top: 10px;
	border: 1px solid #DDE2C6;
	color: #333333;
	background-color: #F3F5E5;
	padding-right: 2px;
	padding-left: 2px;
	padding-top: 5px;
	padding-bottom: 5px;
}

#callout h2{

	border: 1px solid #DDE2C6;
	font-weight: normal;
	background-color: #FFFFFF;
}

#callout p 
{
    padding-left: 2px;
}

fieldset 
{ 
    border:1px solid #6487DC;
    padding: 2px;
    margin: 0px;
    color: #333333;
}



#entry 
{
    padding: 0px;
    margin: 0px 0px 10px 0px;
    
}

#process 
{
    font-size: smaller;
    text-align: left;
    border: none;
    margin-left: 2px;
    width: 155px;
    cursor: pointer;
}
#email 
{
    font-size: smaller;
    text-align: left;
    margin-left: 2px;
    width: 150px;
}

#output 
{
    font-family: Courier;
    font-weight: bold;
    color: #AA2222;
}

.contentImage 
{
    float: right;
    margin-left: 10px;
}

.content blockquote {
	background-color: #EDF2FC;
	font-family: "Courier New", Courier, mono;
	width: 250px;
	padding: 0px 10px;
}

.smaller 
{
    font-size: smaller;
    font-weight: lighter;
}

.action 
{
    color: #440000;
    font-size: larger;
    cursor: pointer;
}

.author 
{
    font-style: italic;
    color: #8CAAE6;
    float: right;
}

.border 
{
    border: 2px dashed red;
}

.clicked 
{
    color: #FF0000;
    background-color: #FFFF00;
    font-weight: bold;
}

.menuHover 
{
    font-weight: bold;
	color: #6487DC;
	cursor: pointer;
}

.selectedItem 
{
    background-color: #FFFFCC;
    list-style-image: url('../images/arrow_right.gif');
}

.razzle a	{
	display: inline-block;
	padding: 4px;
	outline: 0;
	color: #3a599d;
	-webkit-transition-duration: 0.25s;
	-moz-transition-duration: 0.25s;
	-o-transition-duration: 0.25s;
	transition-duration: 0.25s;
	-webkit-transition-property: -webkit-transform;
	-moz-transition-property: -moz-transform;
	-o-transition-property: -o-transform;
	transition-property: transform;
	-webkit-transform: scale(1) rotate(0);
	-moz-transform: scale(1) rotate(0);
	-o-transform: scale(1) rotate(0);
	transform: scale(1) rotate(0);
}
.razzle a:hover {
	background: #3a599d;
	text-decoration: none;
	color: #fff;
	-webkit-border-radius: 4px;
	-moz-border-radius: 4px;
	-o-border-radius: 4px;
	border-radius: 4px;
	-webkit-transform: scale(1.05) rotate(-1deg);
	-moz-transform: scale(1.05) rotate(-1deg);
	-o-transform: scale(1.05) rotate(-1deg);
	transform: scale(1.05) rotate(-1deg);
}
.razzle a:nth-child(2n):hover {
  -webkit-transform: scale(1.05) rotate(1deg);
  -moz-transform: scale(1.05) rotate(1deg);
  -o-transform: scale(1.05) rotate(1deg);
  transform: scale(1.05) rotate(1deg);
}

            
          
!
            
              $(document).ready(function () {
  // provide a header for the results named Selectors
  writeLine("Selectors<hr />");

  // count of all elements
  writeSelectorLength("*");

  // count of elements in body
  writeSelectorLength("body *");

  // count of all divs and p tags
  writeSelectorLength("div,p");

  // count of all p tags direct children of divs
  writeSelectorLength("div > p"); 

  // count of all li tags
  writeSelectorLength("li"); 
});

// helper method to write content at specific location in page
function writeLine(anyHtml) {    
    var output = $("#output");
    var currentOutputContent = output.html();
    output.html(currentOutputContent += anyHtml + "<br />");
}
// helper method to write results of getSelectorLength
function writeSelectorLength(anySelector) {
    writeLine(getSelectorLength(anySelector));
}
// helper methos wrapping results of query in a span
function getSelectorLength(anySelector) {
    return anySelector + 
        "<span class='smaller'> has </span>" + 
        $(anySelector).length + 
        " <span class='smaller'>matches</span>";
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console