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 includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <header>
	jquery-data-api
	<span>form örneği</span>
</header>

<div class="container" data-state="form1" data-value="{}">
	<div class="flex-container">
		<div class="flex-item">
			<input type="text" placeholder="Adınız" data-state="form1.name">
		</div>
		<div class="flex-item">
			<input type="text" placeholder="Soyadınız" data-state="form1.surname">
		</div>
	</div>
	<div class="flex-container">
		<div class="flex-item">
			<select data-state="form1.gender">
				<option selected disabled>Cinsiyet seçin</option>
				<option value="1">Erkek</option>
				<option value="2">Kadın</option>
			</select>
		</div>
		<div class="flex-item">
			<input type="file" data-state="form1.images" multiple accept="image/*">
		</div>
	</div>
	<div class="flex-container">
		<div class="flex-item">
			<select multiple style="height: 120px; padding: 10px" data-state="form1.backendSkills" data-value="['php', 'python']">
				<option value="php">PHP</option>
				<option value="nodej">Nodejs</option>
				<option value="python">Python</option>
				<option value="java">Java</option>
				<option value="dart">Dart</option>
			</select>
		</div>
	</div>
	<div class="flex-container">
		<div class="flex-item">
			<label>
				<input type="checkbox" data-state="form1.accept_rules" value="1">
				Kuralları okuduğumu kabul ediyorum
			</label>
		</div>
	</div>
	<div class="flex-container">
		<div class="flex-item">
			<label>
				<input type="radio" data-state="form1.answer" name="answer" value="evet">
				Evet
			</label>
		</div>
		<div class="flex-item">
			<label>
				<input type="radio" data-state="form1.answer" checked name="answer" value="hayir">
				Hayır
			</label>
		</div>
	</div>
	<div class="flex-container">
		<div class="flex-item flex-button">
			<button data-block data-disabled="!$state.form1.accept_rules" onclick="getData()">
				{$state.form1.accept_rules ? 'Bilgileri Al' : 'Bilgileri almak için kuralları kabul etmelisiniz!'}
			</button>
		</div>
	</div>
	<pre data-block>{parseJson($state.form1)}</pre>
</div>

<script>
const parseJson = (data) => {
    return JSON.stringify(data, null, 2);
}

const getData = () => {
    alert('bilgileri görmek için console a bakın!');
    console.log($state.form1);
}
</script>
              
            
!

CSS

              
                * {
    padding: 0;
    margin: 0;
    list-style: none;
    border: 0;
    box-sizing: border-box;
    text-decoration: none;
}

body {
    background: #eee;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
}

header {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}
header span {
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid #ddd;
    color: rgb(39, 74, 230);
}

.container {
    width: 800px;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    padding: 15px;
    border-radius: 3px;
    box-shadow: 3px 5px 10px 0 rgba(0,0,0,.1);
}

input[type="text"] {
    width: 100%;
    height: 50px;
    border: 1px solid #ddd;
    padding: 0 15px;
    font-size: 16px;
    border-radius: 3px;
}

select {
    width: 100%;
    height: 50px;
    border: 1px solid #ddd;
    padding: 0 15px;
    font-size: 16px;
    border-radius: 3px;
}

.flex-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.flex-item {
    flex: 1;
}
.flex-auto {
    flex: auto;
}

.flex-button button {
    width: 100%;
    height: 50px;
    background: rgb(39, 74, 230);
    border-radius: 3px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
}

pre {
    background: #333;
    color: #fff;
    padding: 20px;
    border-radius: 5px;
    line-height: 1.5;
    font-size: 16px;
    margin-top: 20px;
}

[disabled] {
    opacity: .3;
    pointer-events: none;
}
              
            
!

JS

              
                
              
            
!
999px

Console