최신의 브라우져에서는 HTML5를 지원하기 때문에 placeholder가 문제없이 동작이 되지만
HTML지원이 되지 않는 브라우져에서 placeholder를 지정해도 동작이 되지 않는 문제가 있습니다.
이에 대한 대안으로
jquery.placeholder.js를 이용하면 해결을 할 수가 있습니다.
jquery.placeholder.js는 아래에서 받으시면 됩니다.
https://github.com/mathiasbynens/jquery-placeholder
* 적용방법은
1. 다운로드한 jquery.placeholder.js를 js/jquery.placeholder.js 와 같이 업로드 후
2. 글 작성 스킨 또는 ./head.sub.php에
<script src="<?php echo G5_JS_URL ?>/jquery.placeholder.js"></script>
와 같이 추가합니다.
또한
<script type="text/javascript">
$(function() {
// Invoke the plugin
$('input, textarea').placeholder();
// That’s it, really.
});
</script>
도 추가합니다.
3. 폼 입력 부분에
<input type="text" name="wr_subject" value="<?php echo $subject ?>" placeholder="제목을 입력해 주세요.">
<textarea rows="5" cols="30" name="wr_tips" placeholder="팁 정보를 입력해 주세요."></textarea>
와 같이 placeholder를 작성하시면 됩니다.
자세한 정보는
https://github.com/mathiasbynens/jquery-placeholder
에서 다운받은 파일에 demo.html을 참조 하시기 바랍니다.
이미 알고 계신 팁일지 모르겠군요.^^
도움이 되시길 바랍니다.
감사합니다.
HTML지원이 되지 않는 브라우져에서 placeholder를 지정해도 동작이 되지 않는 문제가 있습니다.
이에 대한 대안으로
jquery.placeholder.js를 이용하면 해결을 할 수가 있습니다.
jquery.placeholder.js는 아래에서 받으시면 됩니다.
https://github.com/mathiasbynens/jquery-placeholder
* 적용방법은
1. 다운로드한 jquery.placeholder.js를 js/jquery.placeholder.js 와 같이 업로드 후
2. 글 작성 스킨 또는 ./head.sub.php에
<script src="<?php echo G5_JS_URL ?>/jquery.placeholder.js"></script>
와 같이 추가합니다.
또한
<script type="text/javascript">
$(function() {
// Invoke the plugin
$('input, textarea').placeholder();
// That’s it, really.
});
</script>
도 추가합니다.
3. 폼 입력 부분에
<input type="text" name="wr_subject" value="<?php echo $subject ?>" placeholder="제목을 입력해 주세요.">
<textarea rows="5" cols="30" name="wr_tips" placeholder="팁 정보를 입력해 주세요."></textarea>
와 같이 placeholder를 작성하시면 됩니다.
자세한 정보는
https://github.com/mathiasbynens/jquery-placeholder
에서 다운받은 파일에 demo.html을 참조 하시기 바랍니다.
이미 알고 계신 팁일지 모르겠군요.^^
도움이 되시길 바랍니다.
감사합니다.
댓글 1개
11년 전
1111
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5152 |
senseme
|
12년 전 | 4143 | |
| 5151 |
senseme
|
12년 전 | 3721 | |
| 5150 |
프로프리랜서
|
12년 전 | 3119 | |
| 5149 |
프로프리랜서
|
12년 전 | 3959 | |
| 5148 |
프로프리랜서
|
12년 전 | 4351 | |
| 5147 |
프로프리랜서
|
12년 전 | 1583 | |
| 5146 |
senseme
|
12년 전 | 2711 | |
| 5145 |
senseme
|
12년 전 | 2696 | |
| 5144 |
senseme
|
12년 전 | 1239 | |
| 5143 | 12년 전 | 1270 | ||
| 5142 | 12년 전 | 8393 | ||
| 5141 |
senseme
|
12년 전 | 1501 | |
| 5140 |
senseme
|
12년 전 | 3737 | |
| 5139 |
senseme
|
12년 전 | 6323 | |
| 5138 |
senseme
|
12년 전 | 1544 | |
| 5137 | 12년 전 | 1131 | ||
| 5136 |
senseme
|
12년 전 | 1304 | |
| 5135 |
senseme
|
12년 전 | 3287 | |
| 5134 |
senseme
|
12년 전 | 1067 | |
| 5133 |
senseme
|
12년 전 | 1811 | |
| 5132 |
senseme
|
12년 전 | 1240 | |
| 5131 |
senseme
|
12년 전 | 901 | |
| 5130 | 12년 전 | 1388 | ||
| 5129 | 12년 전 | 2101 | ||
| 5128 |
senseme
|
12년 전 | 1374 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기