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 class="container-fluid" id="main">
			<div class="container">
				<div class="col-sm-offset-3 col-sm-6">
					<form name="" id="" class=""  method="POST" action="" accept-charset="UTF-8">

						<div class="form-group">
							<!-- <label for="spiner" class="col-sm-3 control-label">Spiner</label> -->
							<!-- <div class="col-sm-9"> -->
								<div class="input-group">
									<input type="text" name="spiner" id="spiner" class="form-control" value="" placeholder="Spiner"/>
									<span class="input-group-btn">
										<button class="btn btn-default plus" type="button" field="spiner">
											<span class="glyphicon glyphicon-plus"></span>
										</button>
										<button class="btn btn-default minus" type="button" field="spiner">
											<span class="glyphicon glyphicon-minus"></span>
										</button>
									</span>
								</div>
							<!-- </div> -->
						</div>

            <div class="form-group">
						<div class="input-group">
							<div class="input-group-addon">
								<span class="glyphicon glyphicon-lock"></span>
							</div>
							<input class="form-control" type="text" id="pass" name="pass" placeholder="Password">
							<span class="input-group-btn">
								<button class="btn btn-default" type="button"  id="pass_refresh">
									<span class="glyphicon glyphicon-refresh"></span>
								</button>
								<button class="btn btn-default" type="button" id="pass_ok">
									<span class="glyphicon glyphicon-ok"></span>
								</button>
								<button class="btn btn-default" type="button" id="pass_copy">
									<span class="glyphicon glyphicon-copy"></span>
								</button>
								<button class="btn btn-default" type="button" id="pass_remove">
									<span class="glyphicon glyphicon-remove"></span>
								</button> </span>
							</div>
							<br/>
							<div class="progress progress-striped active">
								<div id="jak_pstrength" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
							</div>
						</div>
						
						<input class="form-control" type="text" id="cpass" name="cpass" placeholder="Confirm Password">
						<br/>
            
						<textarea class="form-control" id="text" name="text" maxlength="200" placeholder="Type in your message" rows="5"></textarea>
					  <span class="pull-right label label-default" id="count_message"></span>
					  <br>
						<button class="btn btn-info" type="submit">Post New Message</button>
					</form>
				</div>
			</div>
		</div>
		<!-- / -->
              
            
!

CSS

              
                @charset "UTF-8";

/* Table of Contents
 ==================================================
 # Imports
 # Fonts
 # All
 # HTML
 # Body
 # Grid
 # Header
 # Nav
 # Main
 # Aside
 # Footer
 # Typography
 # Elements
 # Components
 # Form
 # Helpers
 # Apps
 # Animations
 # Responsive
 # Print
 ==================================================
 */

/************************* IMPORT *************************/

@import url();

@import url(bootstrap.min.css);
@import url(bootstrap-theme.min.css);
@import url(jquery-ui-1.10.4.custom.min.css);

/************************* FONT *************************/

@font-face {  }

/************************* ALL *************************/

* {  }

/************************* HTML *************************/

html {

}

/* selection */

::selection {  }
::-moz-selection {  }

/************************* BODY *************************/

body {

}

/************************* GRID *************************/

.container-fluid {

}

.container {

}

/************************* HEADER *************************/

/************************* NAV *************************/

/************************* MAIN *************************/

#main {
	margin-top: 50px;
}

/************************* ASIDE *************************/

/************************* FOOTER *************************/

/************************* TYPOGRAPHY *************************/

/************************* ELEMENTS *************************/

/* scroll */

::-webkit-scrollbar-track {
	-webkit-box-shadow: inset 0 0 5px rgba( 0, 0, 0, 0.3 );
	background-color: transparent;
}

::-webkit-scrollbar {
	width: 5px;
	background-color: transparent;
}

::-webkit-scrollbar-thumb {
	background-color: #999;
}

/************************* COMPONENTS *************************/

/* well */

.well {
	border-radius: 0px;
}

/************************* FORM *************************/

/* btn */

.btn {
	border-radius: 0px;
}

/* form-control */

.form-control {
	border-radius: 0px;
}

/* textarea */

textarea {
    resize: none;
}

#count_message {
  background-color: smoke;
  margin-top: -20px;
  margin-right: 5px;
	border-radius: 0px;
}

/* input-group-addon */

.input-group-addon {
	border-radius: 0px;
}

/* placeholders */

::-webkit-input-placeholder {  }
::-moz-placeholder {  }
:-ms-input-placeholder {  }
input:-moz-placeholder {  }

/************************* HELPERS *************************/

/* loader */

.loader {
	background: url(../img/tpl/loader.gif) no-repeat center;
}

/************************* APPS *************************/

/* pace */

.pace {
	-webkit-pointer-events: none;
	pointer-events: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

.pace-inactive {
	display: none;
}

.pace .pace-progress {
	background: #29d;
	position: fixed;
	z-index: 2000;
	top: 0;
	right: 100%;
	width: 100%;
	height: 2px;
}

/************************* ANIMATIONS *************************/

/************************* RESPONSIVE *************************/

/************************* PRINT *************************/

              
            
!

JS

              
                  /* textarea with character count */
	var text_max = 200;
	$('#count_message').html('0 / ' + text_max );
	$('#text').bind('keyup click focus focusout', function() {
		var text_length = $('#text').val().length;
		var text_remaining = text_max - text_length;
		$('#count_message').html(text_length + ' / ' + text_max);
	});

	/* spinner */
	$(".plus").click(function(e) {
		e.preventDefault();
		fieldName = $(this).attr("field");
		var currentVal = parseInt($("input[name=" + fieldName + "]").val());
		if (!isNaN(currentVal)) {
			$("input[name=" + fieldName + "]").val(currentVal + 1);
		} else {
			$("input[name=" + fieldName + "]").val(0);
		}
	});
	$(".minus").click(function(e) {
		e.preventDefault();
		fieldName = $(this).attr("field");
		var currentVal = parseInt($("input[name=" + fieldName + "]").val());
		if (!isNaN(currentVal) && currentVal > 0) {
			$("input[name=" + fieldName + "]").val(currentVal - 1);
		} else {
			$("input[name=" + fieldName + "]").val(0);
		}
	});

/* password generator */
	var copyBtn = document.querySelector('#pass_copy');
	copyBtn.addEventListener('click', function () {
		var urlField = document.querySelector('#pass');
		// select the contents
		urlField.select();
		document.execCommand('copy'); // or 'cut'
	}, false);

	$("#pass_remove").click(function() {
		$("#pass").val(null);
		$("#cpass").val(null);
		$("#jak_pstrength").css('width', '0px');
	});

	$("#pass_ok").click(function() {
		$("#cpass").val($("#pass").val());
	});

	$("#pass_refresh").click(function() {
		$("#pass").val(generatePassword($('#spiner').val()));
		passwordStrength($("#pass").val());
	});

	$("#pass").keyup(function() {
		passwordStrength($(this).val());
	});

	$("#cpass").keyup(function() {
		if ($(this).val() != $("#pass").val()) {
			$(this).css('outline', '1px solid red');
		} else {
			$(this).css('outline', 'none');
		}
	});

	function generatePassword(num) {
		var num = num == 0 ? 8 : num;
		var password = '';
		var availableSymbols = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;\"\'<>,.?/";
		for (var i = 0; i < num; i++) {
			var symbol = availableSymbols[(Math.floor(Math.random() * availableSymbols.length))];
			password += symbol;
		}
		return password;
	}

	/* Password strength indicator */
	function passwordStrength(password) {
		var desc = [{
			'width' : '0px'
		}, {
			'width' : '20%'
		}, {
			'width' : '40%'
		}, {
			'width' : '60%'
		}, {
			'width' : '80%'
		}, {
			'width' : '100%'
		}];
		var descClass = ['', 'progress-bar-danger', 'progress-bar-danger', 'progress-bar-warning', 'progress-bar-success', 'progress-bar-success'];
		var score = 0;

		//if password bigger than 6 give 1 point
		if (password.length > 6)
		score++;

		//if password has both lower and uppercase characters give 1 point
		if ((password.match(/[a-z]/)) && (password.match(/[A-Z]/)))
		score++;

		//if password has at least one number give 1 point
		if (password.match(/d+/))
		score++;

		//if password has at least one special caracther give 1 point
		if (password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/))
		score++;

		//if password bigger than 12 give another 1 point
		if (password.length > 10)
		score++;

		// display indicator
		$("#jak_pstrength").removeClass(descClass[score - 1]).addClass(descClass[score]).css(desc[score]);
	}
              
            
!
999px

Console