[jQuery]toggleClass() ¸Þ¼µå·Î CSS Ŭ·¡½º¿¡ ´ëÇÑ Åä±×¸µ |
|
|
![](icon/private_name/1.gif) |
8³â Àü
|
<style type="text/css">
.hidden { display:none; }
</style>
<script src="js/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#btn').click(function () {
//[!] hidden CSS Class¿¡ ´ëÇؼ addClass()<->removeClass()
$('#myLayer').toggleClass('hidden');
});
});
</script>
<h1>¹öÆ°À» Ŭ¸¯ÇÒ ¶§¸¶´Ù ·¹ÀÌ¾î º¸À̱â/¼û±â±â</h1>
<input id="btn" type="button" value="¹öÆ°">
<div id="myLayer" style="background-color: yellow;">
¾È³ç
</div>
|
|
̵̧ : 300 |
̵̧
¸ñ·Ï
|
|