1. Qitailang's HP
  2. webtech

フィールド内にラベルを表示する

2014/08/17

sample

<script type="text/javascript" src="jquery-1.7.2.min.js"></script> 
<script type="text/javascript" src="jquery.infieldlabels.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('form').inFieldLabels();
		//$('form').inFieldLabels('.in-field-label');クラス指定も可
	});
</script>
<style type="text/css">
	label {display:block;}
	.label {color:#888;}
</style>
<form action="#" method="post">
	<label for="example">Example Label</label>
	<input type="text" id="example" />
</form>

Download:https://github.com/richardscarrott/jquery-in-field-labels