jquery의 focusin을 이용해서 객체를 잠깐만 보이게 하는 방법

1. 잠깐만 나타날 HTML 객체가 있다.


<p><input type="text"> <span>이름</span> </p>
<p><input type="text"> <span>주소</span> </p>




2. css 속성은 보이지 않는 것이다.


<style>
span { display: none; }
</style>



3. focus in 되면 잠깐동안만 display:none이 안되도록 한다.


<script>
$( 'p' ).focusin(function() {
$( this ).find('span')
.css( "display", "inline" )
.fadeOut( 1000 );
});
</script>