11월, 2017의 게시물 표시

[jQuery] 페럴럭스 기초

<style type="text/css"> *{margin:0;padding:0;list-style:none;} html,body{height:100%;font-size:14px/1.5} .wrap{height:100%;} .menu{position:fixed;top:30px;left:30px;} .menu li.on a{font-weight:bold;color:#fff;} .btmLine{position:fixed;left:0;top:0;width:100%;height:10px;background:#999;} .btmLine span{display:block;width:0%;height:10px;background:#000;} .wrap div:nth-child(1){background:#ffcc00} .wrap div:nth-child(2){background:#0066cc} .wrap div:nth-child(3){background:#cc3366} .wrap div:nth-child(4){background:#66cc66} .scrollBox{font-size:50px;color:#fff;text-align:center;} .scrollBox.on{font-size:100px;color:#000;} </style> <div class="wrap"> <div class="scrollBox on" id="scrollBox01">1</div> <div class="scrollBox" id="scrollBox02">2</div> <div class="scrollBox" id="scrollBox03">3</div> <div class="scrollBox" i

[jQuery] 체크박스 전체 선택

$(document).ready(function(){ $("#check-all").on("click", function(){         if($("#check-all").prop("checked")){             $("input[name=check-type]").prop("checked",true);         }else{             $("input[name=check-type]").prop("checked",false);         }     }); $("input[name=check-type]").on("click", function(){ if($(this).is(":checked") == false){ $("#check-all").prop("checked",false) } }); });