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.

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