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

HTML

              
                <div><strong>Click and drag</strong> to check boxes as you go,<br/>or<br/> <strong>shift+click and drag</strong> to select/deselect multiple checkboxes at once via selection area</div><br/>
		<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
		<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<div class="check-wrapper">
			<input type="checkbox" value="check-1" />
			<input type="checkbox" value="check-2" />
			<input type="checkbox" value="check-3" />
			<input type="checkbox" value="check-4" />
			<input type="checkbox" value="check-5" />
			<input type="checkbox" value="check-6" />
			<input type="checkbox" value="check-7" />
			<input type="checkbox" value="check-8" />
			<input type="checkbox" value="check-9" />
			<input type="checkbox" value="check-10" />
		</div>
<br/><br/>
<div><a href="https://chrome.google.com/webstore/detail/multicheck-checkbox-check/bmcleiancmakcoknkgnfgijomcddhpbi" target="_chrome">Click here to use this functionality on ANY* webpage in the form of a Chrome extension!</a></div>
<em>*does not work inside of iframes</em>
              
            
!

CSS

              
                html *, body *{
  -moz-user-select: -moz-none;
  -moz-user-select: none;
  -o-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -ms-user-select':'none;
  user-select:none;
}
input{
  width: 15px;
  height: 15px;
}
              
            
!

JS

              
                var checkArrayLeft = [];
var checkArrayTop = [];
var checkArrayRight = [];
var checkArrayBottom = [];

$('body input[type="checkbox"]').each(function(){
	
	var thisOffset = $(this).offset();
	var thisWidth = $(this).width();
	var thisHeight = $(this).height();
	
	checkArrayRight.push(thisOffset.left);
	checkArrayBottom.push(thisOffset.top);
	checkArrayTop.push(thisOffset.top + thisHeight);
	checkArrayLeft.push(thisOffset.left + thisWidth);

});

var exEnabled = true;
var moudow = false;

$(document).keydown(function (e) {

	if(e.keyCode == 16) {
		shifting = true;
	}

});



$(document).on('mousedown', function(){
	if(!shifting){
		moudow = true;
	}
});

$(document).on('mouseup', function(){
	moudow = false;
});

$('body input[type="checkbox"]').mouseenter(function(){
	if(exEnabled){
		if(moudow){
			$(this).click();
		}
	};
});

$('body input[type="checkbox"]').on('mousedown', function(){
	if(exEnabled){
		if(!shifting){
			moudow = true;
			$(this).click();
		}
	};
});

$('body input[type="checkbox"]').click(function(e){
	if(exEnabled){
		$(this).click();
	};
});

var dragging = false;
var shifting = false;
var mx = 0;
var my = 0;

$(document).keyup(function (e) {

	if(e.keyCode == 16) {
		dragging = false;
		shifting = false;
		defaulted = true;
		$('.highlight-area').remove();
	}

});

$(document).on('mousedown', function(e){
	
	if(shifting){
		mx = e.pageX;
		my = e.pageY;
		$('body').prepend('<div class="highlight-area" style="position: absolute; background: rgba(21, 155, 255, 0.2); border: 1px solid rgba(21, 155, 255, 0.8);"></div>');
		startDrag(mx, my);
	}
});

$(document).on('mouseup', function(){
	registerChecks();
});

$(document).on('mousemove', function(e){
	
	if(dragging){
	
		var moveX = e.pageX;
		var moveY = e.pageY;
		var xDif = moveX - mx;
		var yDif = moveY - my;
						
		if(xDif < 0){
			$('.highlight-area').offset({
				left: moveX
			});
		}
		
		if(yDif < 0){
			$('.highlight-area').offset({
				top: moveY
			});
		}
		
		$('.highlight-area').css({
			
			width: Math.abs(xDif),
			height: Math.abs(yDif)
			
		});
				
	}		
	
});

function startDrag(x, y){
		
	dragging = true;
	
	$('.highlight-area').offset({
		top: y,
		left: x
	});
	
}

function registerChecks(){
		
	dragging = false;
	
	if(shifting){
	
		
		var areaWidth = $('.highlight-area').width();
		var areaHeight = $('.highlight-area').height();
		var hiRangeLeft = $('.highlight-area').offset().left;
		var hiRangeRight = $('.highlight-area').offset().left + areaWidth;
		var hiRangeTop = $('.highlight-area').offset().top;
		var hiRangeBottom = $('.highlight-area').offset().top + areaHeight;
		
		for(var i=0; i<checkArrayLeft.length; i++){
				
			if(checkArrayRight[i] <= hiRangeRight && checkArrayLeft[i] >= hiRangeLeft && checkArrayBottom[i] <= hiRangeBottom && checkArrayTop[i] >= hiRangeTop){
				$('body input[type="checkbox"]').eq(i).click();
			}
			
		};
		
	}
	
	$('.highlight-area').remove();
	
}

              
            
!
999px

Console