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.

Quick-add: + add another resource

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.

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.

              <div class="button button--1">1</div>
<div class="button button--2">2</div>
<div class="button button--3">3</div>
<div class="button button--4">4</div>
<div class="button button--5">5</div>
<div class="button button--6">6</div>
	background-color: blue
	width: 100px
	height: 100px
	float: left

		background-color: red
		background-color: green
		background-color: yellow

		background-color: blue
		background-color: red
              //参考 https://app.codegrid.net/entry/practical-jquery-1
//    http://www.jquerystudy.info/reference/events/currentTarget.html
$('.button--1').on('click', doAlert);

function doAlert (){

$('.button--2').on('click', function(){

$('.button--3').on('click mouseenter', function(){

//$('セレクタ').on({'key1':value1, 'key2':value2, 'key3':value2 });

	'click' : function(){
	'mouseenter' : function(){

	'click' : doClick,
	'mouseenter' : doMouseEnter

function doMouseEnter(){
	alert("mouse enter");

function doClick(){

//二番目の引数に、{key: 値}を与えると、関数が受け取ったevent.dataの下に入る。
$('.button--6').on('click', {value: 3,test: 4 },doCount);

function doCount (e){
	alert("count: " + e.data.value);
	alert("test: " + e.data.test);
	let htmlContent = $(e.currentTarget).html();
Loading ..................