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.

              <select class="operand1">
	<option value="1">1</option>
	<option value="2">2</option>
	<option value="3">3</option>
<select class="operator">
	<option value="+">+</option>
	<option value="-">-</option>
	<option value="*">*</option>
	<option value="/">/</option>
<select class="operand2">
	<option value="1">1</option>
	<option value="2">2</option>
	<option value="3">3</option>
<input type="text" class="input">
    display: inline-block;
    padding: 14px 10px;
    border: 1px solid #a7a7aa;
    border-radius: 3px;
    background-color: #cccccc;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    line-height: 1;
    background-color: #e1e1e1;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#ffe1e1e1', GradientType=0);
    background-image: -moz-linear-gradient(top, #f9f9f9, #e1e1e1);
    background-image: -ms-linear-gradient(top, #f9f9f9, #e1e1e1);
    background-image: -o-linear-gradient(top, #f9f9f9, #e1e1e1);
    background-image: -webkit-gradient(linear, center top, center bottom, from(#f9f9f9), to(#e1e1e1));
    background-image: -webkit-linear-gradient(top, #f9f9f9, #e1e1e1);
    background-image: linear-gradient(top, #f9f9f9, #e1e1e1);
    color: #333333;
    padding-top: 17px;
    padding-bottom: 15px;
    text-align: left;
    font-size: 15px;
    padding-top: 5px;
    padding-bottom: 4px;
    border: 1px solid #a7a7aa;
    border-radius: 3px;
    color: #333;
    line-height: 1;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) inset;
	var stream1 = $(".operand1")
		return {operand1:parseInt($(e.target).val())};
	var stream2 = $(".operator")
		return {operator:$(e.target).val()};
	var stream3 = $(".operand2")
		return {operand2:parseInt($(e.target).val())};
	var stream4 = stream1.merge(stream2).merge(stream3);
	var initialValue = {operand1:1,operator:"+",operand2:1};
	var extendObj = function(curr,v){
		return $.extend(curr,v);
	var calcFromObj = function(curr,v){
		if(v.operator == "+"){
			return v.operand1 + v.operand2;
		}else if(v.operator == "-"){
			return v.operand1 - v.operand2;
		}else if(v.operator == "*"){
			return v.operand1 * v.operand2;
			return v.operand1 / v.operand2;
	var stream5 = stream4.scan(initialValue,extendObj);
	var stream6 = stream5.scan(2,calcFromObj);
Loading ..................