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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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 class='questionMarkIcon'>
<div class='questionMarkbox'> 
<div class='questionMarkcontent'></div> 
</div>
</div>
<div class="mainPane">
<div class='stepCounter'>1/5</div>  
<br />
<br />  
  <tag>Smoke Out Validation</tag>
<div class="controlPane">
<form name="myForm" onsubmit="return validateForm()">
<input id="fname" type="text" placeholder="First Name" />
<input id="mname" type="text" placeholder="Middle Name (Optional)" />  
<input id="lname" type="text" placeholder="Last Name" />  
<input type="submit" class="commitButtonGo" value="Next"/>
</form>
</div>  
<div> 
</div>
            
          
!
            
              html {
   background:url(
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIklEQVQIW2NkQAIcDz/8Z4TxQZwf8gKMYAEYB8RmROaABADTxw7db5Bt2QAAAABJRU5ErkJggg==
    ) repeat;
}
.stepCounter {
border-style: none;
color: Grey;
font-weight: bold;
height: 50px;
width: 300px;
margin-right:20px;       
float:right;
text-align: right;    	
}

.questionMarkIcon {
top: -2px; 
left: -2px; 
border: 0;
position: absolute;
}

.questionMarkbox{
position: relative;
width: 65px;		/* desired width */
}

.questionMarkbox:before{
content: "";
display: block;
padding-top: 100%; 	/* initial ratio of 1:1*/
}

.questionMarkcontent{
position:  absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-image:url('http://findicons.com/files/icons/1964/colorcons_green/64/questionmark.png');  
}

.commitButtonGo {
background-color: #00CC00;
color: White;
font-weight: bold;
height: 50px;
width: 300px;  
margin-top:5%;
}

input[type=text]:focus {
box-shadow: 0 0 3000px 3000px rgba(64, 64, 64, .7);
position: relative;
z-index: 99999;
border-style: solid;
border-width:1px;  
border-color:blue;
}

input {
font-size: 21px;
font-weight: bold;
display: block;
margin-top:7%;
outline:0;
border:0;
padding: 10px 10px;
font-size: 13px;
width: 300px;
border-radius: 4px;
-webkit-box-shadow: 1px 1px 5px 0px rgba(99,99,88,1);
-moz-box-shadow: 1px 1px 5px 0px rgba(99,99,88,1);
box-shadow: 1px 1px 5px 0px rgba(99,99,88,1);
text-transform:capitalize;
}

.controlPane, tag {
  padding-left:30%; 
  display:inline-block;
  left: 50%;
  margin-left: -100px;  
  left: 50%;
  margin-left: -100px;  
}

tag {
  font-size: 40px;
  white-space: nowrap;
}
 

/******float placeholders***/
input::-webkit-input-placeholder {
	color: #CCCCCC;
	position: relative;
	padding-left: 0;
	-webkit-transition: padding 0.5s;
	/* For Safari 3.1 to 6.0 */
	transition: padding 0.5s;
}

input:-moz-placeholder {
	/* Firefox 18- */
	color: #CCCCCC;
	position: relative;
	padding-left: 0;
	-moz-transition: padding 0.5s;
	/* For Safari 3.1 to 6.0 */
	transition: padding 0.5s;
}

input::-moz-placeholder {
	/* Firefox 19+ */
	color: #CCCCCC;
	position: relative;
	padding-left: 0;
	-moz-transition: padding 0.5s;
	/* For Safari 3.1 to 6.0 */
	transition: padding 0.5s;
}

input:-ms-input-placeholder {
	color: #CCCCCC;
	position: relative;
	/*padding-left:0;*/
	-ms-transition: padding 0.5s;
	/* For Safari 3.1 to 6.0 */
	transition: padding 0.5s;
}
/*
* On hover
*/
input:hover::-webkit-input-placeholder, input:focus::-webkit-input-placeholder {
	padding-left: 40%;
}

input:hover:-moz-placeholder, input:focus:-moz-placeholder {
	/* Firefox 18- */
	padding-left: 40%;
}

input:hover::-moz-placeholder, input:focus::-moz-placeholder {
	/* Firefox 19+ */
	padding-left: 40%;
}

input:hover:-ms-input-placeholder, input:focus:-ms-input-placeholder {
	padding-left: 40%;
}

input [type=text] {
	-webkit-transform: translate(-50%,-50%);
	-moz-transform: translate(-50%,-50%);
	-ms-transform: translate(-50%,-50%);
	-o-transform: translate(-50%,-50%);
	transform: translate(-50%,-50%);
}

            
          
!
            
              $(document).ready(function(){
    
	//test first name
	$(".commitButtonGo").on("click",function(){
		var xStringTest=$("#fname").val();	
		var xStringTest2=$("#lname").val();	
		if (xStringTest==null || xStringTest=="") {
			$("#fname").css("background-color","pink")  
			return false;
		} else if (xStringTest2==null || xStringTest2=="") {
			$("#lname").css("background-color","pink")  
			return false;
	  } else {
			alert('These are not the droids your looking for -=NEXT!');
		}
	});

	$("#fname").blur(function(){
		var xStringTest = $("#fname").val();
		if(jQuery.trim(xStringTest).length > 0) {
		   $("#fname").css("background-color","white");
		}    
	});
  
  

	//test last name
	$(".commitButtonGo").on("click",function(){
		var xStringTest=$("#lname").val();
		if (xStringTest==null || xStringTest=="") {
			$("#lname").css("background-color","pink")  
			return false;
		}
	});

	$("#lname").blur(function(){
		var xStringTest = $("#lname").val();
		if(jQuery.trim(xStringTest).length > 0) {
		   $("#lname").css("background-color","white");
		}
	});

});

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console