http://jigsaw.w3.org/css-validator/

유명한 W3 의 css validator 입니다.
by Anna 안나 2008. 11. 15. 17:19
<jQuery Core> 닫기" folder_opener="" use_folder="Y" editor_component="quotation" 2266EE?> 1. jQuery( html ) Returns: jQuery
jQuery( html ), 실행후 jQuery객체를 반환 Create DOM elements on-the-fly from the provided String of raw HTML.
주어진 html을 가지고 빠르게 문서 원소를 생성한다.
그리고 jQuery객체로서 그 것을 반환한다.
이말은 그것을 이어서 jQuery의 다른 함수와 함께 사용가능하다는 뜻이다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("<div><p>Hello</p></div>").appendTo("body");
});
</script> </head>
<body>
</body>
</html>
2. jQuery( elements ) Returns: jQuery
jQuery( 원소 ) jQuery( 원소.원소.원소 ), 실행후 jQuery객체를 반환 Wrap jQuery functionality around a single or multiple DOM Element(s).
하나 또는 다단계의 문서원소로서 사용할수 있다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$(document.body).css( "background", "black" );
});
</script> </head>
<body>
</body>
</html>
3. jQuery( callback ) Returns: jQuery
jQuery( 콜백함수 ), 실행후 jQuery객체를 반환 A shorthand for $(document).ready().
$()은 $(document).ready() 의 짧은 표현으로 사용가능하다.
$(document).ready() 은 문서가 사용가능한 시점을 자동으로 인식하여 주어진 콜백 함수를 동작시킨다.
콜백함수란 지정된 행위가 끝난다음 자동적으로 실행될 함수를 의미한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(function(){ $(document.body).css( "background", "black" );
});
</script> </head>
<body>
</body>
</html>
4. each( callback ) Returns: jQuery
each( 콜백함수 ), 실행후 jQuery객체를 반환 Execute a function within the context of every matched element.
매치 되어진 모든 원소에 대해 주어진 콜백 함수를 실행한다. 루프의 의미이다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $(document.body).click(function () {
$("div").each(function (i) {
if (this.style.color != "blue") {
this.style.color = "blue";
} else {
this.style.color = "";
}
});
}); });
</script>
<style>
div { color:red; text-align:center; cursor:pointer;
font-weight:bolder; width:300px; }
</style>
</head>
<body>
<div>Click here</div>
<div>to iterate through</div>
<div>these divs.</div>
</body>
</html>
5. size( ) Returns: Number
size( ), 실행후 숫자를 반환 The number of elements in the jQuery object.
매치되어진 원소들의 갯수를 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $(document.body).click(function () {
$(document.body).append($("<div>"));
var n = $("div").size();
$("span").text("There are " + n + " divs." +
"Click to add more.");
}).click(); // trigger the click to start });
</script>
<style>
body { cursor:pointer; }
div { width:50px; height:30px; margin:5px; float:left;
background:blue; }
span { color:red; }
</style>
</head>
<body>
<span></span>
<div></div>
</body>
</html>
6. length Returns: Number
length, 실행후 숫자를 반환 The number of elements in the jQuery object.
매치되어진 원소들의 갯수를 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $(document.body).click(function () {
$(document.body).append($("<div>"));
var n = $("div").length;
$("span").text("There are " + n + " divs." +
"Click to add more.");
}).trigger('click'); // trigger the click to start });
</script>
<style>
body { cursor:pointer; }
div { width:50px; height:30px; margin:5px; float:left;
background:green; }
span { color:red; }
</style>
</head>
<body>
<span></span>
<div></div>
</body>
</html>
7. get( ) Returns: Array<Element>
get( ), 실행후 원소 배열 반환 Access all matched DOM elements.
매치되는 모든 문서 원소들을 배열로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ function disp(divs) {
var a = [];
for (var i = 0; i < divs.length; i++) {
a.push(divs[i].innerHTML);
}
$("span").text(a.join(" "));
} disp( $("div").get().reverse() ); });
</script>
<style>
span { color:red; }
</style>
</head>
<body>
Reversed - <span></span>
<div>One</div>
<div>Two</div>
<div>Three</div>
</body>
</html>
8. get( index ) Returns: Element
get( 인덱스 ), 실행후 매치 되는 원소를 반환 Access a single matched DOM element at a specified index in the matched set.
매치되는 원소들 중 주어진 인덱스에 해당하는 하나의 원소만 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("*", document.body).click(function (e) {
e.stopPropagation();
var domEl = $(this).get(0);
$("span:first").text("Clicked on - " + domEl.tagName);
}); });
</script>
<style>
span { color:red; }
div { background:yellow; }
</style>
</head>
<body>
<span> </span>
<p>In this paragraph is an <span>important</span> section</p>
<div><input type="text" /></div>
</body>
</html>
9. index( subject ) Returns: Number
index( 객체 ), 실행후 숫자를 반환 Searches every matched element for the object and returns the index of the element, if found, starting with zero.
매치되어진 원소들에 대해 주어진 객체와 동일한것을 검색하여,
존재하면 그 원소들중에 몇번째에 해당하는가 하는 인덱스 번호를 반환한다.
인덱스는 0부터 시작한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div").click(function () {
// this is the dom element clicked
var index = $("div").index(this);
$("span").text("That was div index #" + index);
}); });
</script>
<style>
div { background:yellow; margin:5px; }
span { color:red; }
</style>
</head>
<body>
<span>Click a div!</span>
<div>First div</div>
<div>Second div</div>
<div>Third div</div>
</body>
</html>
10. jQuery.fn.extend( object ) Returns: jQuery
jQuery.fn.extend( 객체), 실행후 jQuery객체를 반환 Extends the jQuery element set to provide new methods (used to make a typical jQuery plugin).
제이쿼리에 새로운 함수를 확장한다.(플러그인으로 만들어 사용한다.)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
jQuery.fn.extend({
check: function() {
return this.each(function() { this.checked = true; });
},
uncheck: function() {
return this.each(function() { this.checked = false; });
}
}); $(function(){ $("#button1").click(function(){ $('input').check();
}); $("#button2").click(function(){ $('input').uncheck();
});
});
</script>
<style>
div { background:yellow; margin:5px; }
span { color:red; }
</style>
</head>
<body>
<form>
<input type="checkbox" name="">
<input type="checkbox" name="">
<input type="checkbox" name="">
<input type="checkbox" name="">
<input type="checkbox" name="">
<input type="checkbox" name="">
</form>
<input type='button' id='button1' value='전체선택'>
<input type='button' id='button2' value='전체해제'>
</body>
</html>
11. jQuery.extend( object ) Returns: jQuery
jQuery.fn.extend( 객체), 실행후 jQuery객체를 반환 Extends the jQuery object itself.
제이쿼리 자체를 확장
아직은 잘 모르겟음
14. jQuery.noConflict( ) Returns: jQuery
jQuery.noConflict( ), 실행후 jQuery객체를 반환 Run this function to give control of the $ variable back to whichever library first implemented it.
아직은 잘 모르겠음
15. jQuery.noConflict( extreme ) Returns: jQuery
jQuery.noConflict( extreme ), 실행후 jQuery객체를 반환 Revert control of both the $ and jQuery variables to their original owners. Use with discretion.
아직은 잘 모르겠음



<Selectors>=>객체 선책 닫기" folder_opener="=>객체 선책" use_folder="Y" editor_component="quotation" 2266EE?> 1. #id Returns: Element
#아이디, 실행후 원소 반환 Matches a single element with the given id attribute.
주어진 아이디에 매치되는 원소하나를 찾아 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("#myDiv").css("border","3px solid red");
});
</script>
<style>
div {
width: 90px;
height: 90px;
float:left;
padding: 5px;
margin: 5px;
background-color: #EEEEEE;
}
</style>
</head>
<body>
<div id="notMe"><p>id="notMe"</p></div>
<div id="myDiv">id="myDiv"</div>
</body>
</html>
2. element Returns: Array<Element>
원소명, 실행후 원소 배열 반환 Matches all elements with the given name.
주어진 원소명에 매치되는 모든 원소를 배열로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div").css("border","3px solid red");
});
</script>
<style>
div,span {
width: 60px;
height: 60px;
float:left;
padding: 10px;
margin: 10px;
background-color: #EEEEEE;
}
</style>
</head>
<body>
<div>DIV1</div>
<div>DIV2</div>
<span>SPAN</span>
</body>
</html>
3. .class Returns: Array<Element>
클래스명, 실행후 원소배열로 반환 Matches all elements with the given class.
주어진 클래스명에 매치되는 모든 원소를 배열로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$(".myClass").css("border","3px solid red");
});
</script>
<style>
div,span {
width: 150px;
height: 60px;
float:left;
padding: 10px;
margin: 10px;
background-color: #EEEEEE;
}
</style>
</head>
<body>
<div class="notMe">div class="notMe"</div>
<div class="myClass">div class="myClass"</div>
<span class="myClass">span class="myClass"</span>
</body>
</html>
4. * Returns: Array<Element>
모든것, 실행후 원소 배열로 반환 Matches all elements.
매치되는 모든 원소를 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("*").css("border","3px solid red");
});
</script>
<style>
div,span,p {
width: 150px;
height: 60px;
float:left;
padding: 10px;
margin: 10px;
background-color: #EEEEEE;
}
</style>
</head>
<body>
<div>DIV</div>
<span>SPAN</span>
<p>P <button>Button</button></p>
</body>
</html>
5. selector1, selector2, selectorN Returns: Array<Element>
selector1, selector2, selectorN, 실행후 원소배열로 반환 Matches the combined results of all the specified selectors.
주어진 것들에 대해 매치되는 모든 원소를 배열로 반환
구분자는 , <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div,span,p.myClass").css("border","3px solid red");
});
</script>
<style>
div,span,p {
width: 130px;
height: 60px;
float:left;
padding: 3px;
margin: 2px;
background-color: #EEEEEE;
font-size:14px;
}
</style>
</head>
<body>
<div>div</div>
<p class="myClass">p class="myClass"</p>
<p class="notMyClass">p class="notMyClass"</p>
<span>span</span>
</body>
</html>
6. ancestor descendant Returns: Array<Element>
조상 자손, 실행후 원소 배열로 반환 Matches all descendant elements specified by "descendant" of elements specified by "ancestor".
주어진 조상에 주어진 자손을 가진 모든 자손을 배열로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("form input").css("border", "2px dotted blue");
});
</script>
<style>
body { font-size:14px; }
form { border:2px green solid; padding:2px; margin:0;
background:#efe; }
div { color:red; }
fieldset { margin:1px; padding:3px; }
</style>
</head>
<body>
<form>
<div>Form is surrounded by the green outline</div>
<label>Child:</label>
<input name="name" />
<fieldset>
<label>Grandchild:</label>
<input name="newsletter" />
</fieldset>
</form>
Sibling to form: <input name="none" />
</body>
</html>
7. parent > child Returns: Array<Element>
조상 > 자손, 실행후 원소 배열 반환 Matches all child elements specified by "child" of elements specified by "parent".
주어진 조상에 포함된 주어진 자손에 매치되는 일단계 자손들만 모두 배열로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("#main > *").css("border", "3px double red");
});
</script>
<style>
body { font-size:14px; }
span#main { display:block; background:yellow; height:110px; }
button { display:block; float:left; margin:2px;
font-size:14px; }
div { width:90px; height:90px; margin:5px; float:left;
background:#bbf; font-weight:bold; }
div.mini { width:30px; height:30px; background:green; }
</style>
</head>
<body>
<span id="main">
<div></div>
<button>Child</button>
<div class="mini"></div>
<div>
<div class="mini"></div>
<div class="mini"></div>
</div>
<div><button>Grand</button></div>
<div><span>A Span <em>in</em> child</span></div>
<span>A Span in main</span>
</span>
</body>
</html>
8. prev + next Returns: Array<Element>
앞 뒤, 실행후 원소배열 반환 Matches all next elements specified by "next" that are next to elements specified by "prev".
주어진 앞원소와 뒤원소에 순차적으로 매치 되는 뒤원소들을 모두 배열로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("label + input").css("color", "blue").val("Labeled!")
});
</script> </head>
<body>
<form>
<label>Name:</label>
<input name="name" />
<fieldset>
<label>Newsletter:</label>
<input name="newsletter" />
</fieldset>
</form>
<input name="none" />
</body>
</html>
9. prev ~ siblings Returns: Array<Element>
앞원소~형제 원소, 실행후 원소배열 반환 Matches all sibling elements after the "prev" element that match the filtering "siblings" selector.
주어진 앞원소와 형제인 뒤원소를 찾아 모두 배열로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("#prev ~ div").css("border", "3px groove blue");
});
</script>
<style>
div,span {
display:block;
width:80px;
height:80px;
margin:5px;
background:#bbffaa;
float:left;
font-size:14px;
}
div#small {
width:60px;
height:25px;
font-size:12px;
background:#fab;
}
</style>
</head>
<body>
<div>div (doesn't match since before #prev)</div>
<div id="prev">div#prev</div>
<div>div sibling</div>
<div>div sibling <div id="small">div neice</div></div>
<span>span sibling (not div)</span>
<div>div sibling</div>
</body>
</html>
10. :first Returns: Element
첫번째, 실행후 원소 반환 Matches the first selected element.
매치되는 원소들중 첫번째 것만 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("tr:first").css("font-style", "italic");
});
</script>
<style>
td { color:blue; font-weight:bold; }
</style>
</head>
<body>
<table>
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
</table>
</body>
</html>
11. :last Returns: Element
마지막, 실행후 원소 반환 Matches the last selected element.
매치되는 원소들중 마지막 것만 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("tr:last").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
});
</script> </head>
<body>
<table>
<tr><td>First Row</td></tr>
<tr><td>Middle Row</td></tr>
<tr><td>Last Row</td></tr>
</table>
</body>
</html>
12. :not(selector) Returns: Array<Element>
아니다, 실행후 원소 배열 반환 Filters out all elements matching the given selector.
주어진 것에 해당하지 않는 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("input:not(:checked) + span").css("background-color", "yellow");
$("input").attr("disabled", "disabled"); });
</script> </head>
<body>
<div>
<input type="checkbox" name="a" />
<span>Mary</span>
</div>
<div>
<input type="checkbox" name="b" />
<span>Paul</span>
</div>
<div>
<input type="checkbox" name="c" checked="checked" />
<span>Peter</span>
</div>
</body>
</html>
13. :even Returns: Array<Element>
짝수, 실행후 원소 배열 반환 Matches even elements, zero-indexed.
매치된 원소들 중에서 인덱스가 짝수인것 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("tr:even").css("background-color", "#bbbbff");
});
</script>
<style>
table {
background:#eeeeee;
}
</style>
</head>
<body>
<table border="1">
<tr><td>Row with Index #0</td></tr>
<tr><td>Row with Index #1</td></tr>
<tr><td>Row with Index #2</td></tr>
<tr><td>Row with Index #3</td></tr>
</table>
</body>
</html>
14. :odd Returns: Array<Element>
홀수, 실행후 원소 배열 반환 Matches odd elements, zero-indexed.
매치된 원소들 중에서 인덱스가 홀수인것 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("tr:odd").css("background-color", "#bbbbff");
});
</script>
<style>
table {
background:#f3f7f5;
}
</style>
</head>
<body>
<table border="1">
<tr><td>Row with Index #0</td></tr>
<tr><td>Row with Index #1</td></tr>
<tr><td>Row with Index #2</td></tr>
<tr><td>Row with Index #3</td></tr>
</table>
</body>
</html>
15. :eq(index) Returns: Element
eq(인덱스), 실행후 원소 반환 Matches a single element by its index.
매치된 원소들 중에서 주어진 인덱스에 매치되는 원소 한개를 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("td:eq(2)").css("text-decoration", "blink");
});
</script> </head>
<body>
<table border="1">
<tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>
<tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>
<tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>
</table>
</body>
</html>
16. :gt(index) Returns: Array<Element>
초과, 실행후 원소 배열 반환 Matches all elements with an index above the given one.
매치된 원소들 중에서 인덱스로 주어진 것보다 큰 인덱스 들을 모두 배열로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("td:gt(4)").css("text-decoration", "line-through");
});
</script> </head>
<body>
<table border="1">
<tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>
<tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>
<tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>
</table>
</body>
</html>
17. :lt(index) Returns: Array<Element>
미만, 실행후 원소 배열 반환 Matches all elements with an index below the given one.
매치된 원소들 중에서 인덱스로 주어진 것보다 작은 인덱스 들을 모두 배열로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("td:lt(4)").css("color", "red");
});
</script> </head>
<body>
<table border="1">
<tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>
<tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>
<tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>
</table>
</body>
</html>
18. :header Returns: Array<Element>
헤더, 실행후 원소 배열 반환 Matches all elements that are headers, like h1, h2, h3 and so on.
매치되는 원소들 중에서 h1, h2 ... 와 같은 헤더 태그들을 모두 배열로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$(":header").css({ color:'blue' });
});
</script>
<style>
body { font-size: 10px; font-family: Arial; }
h1, h2 { margin: 3px 0; }
</style>
</head>
<body>
<h1>Header 1</h1>
<p>Contents 1</p>
<h2>Header 2</h2>
<p>Contents 2</p>
</body>
</html>
19. :animated Returns: Array<Element>
움직인다, 실행후 원소 배열 반환 Matches all elements that are currently being animated.
매치된 원소들 중에서 애니메이션이 동작하고 있는 것들을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("#run").click(function(){
$("div:animated").toggleClass("colored");
});
function animateIt() {
$("#mover").slideToggle("slow", animateIt);
}
animateIt(); });
</script>
<style>
div { background:yellow; border:1px solid #AAA; width:80px; height:80px; margin:5px; float:left; }
div.colored { background:green; }
</style>
</head>
<body>
<button id="run">Run</button>
<div></div>
<div id="mover"></div>
<div></div>
</body>
</html>
20. :contains(text) Returns: Array<Element>
포함, 실행후 원소 배열 반환 Matches elements which contain the given text.
매치된 원소들 중에서 주어진 텍스트를 포함하는 것들을 모두 배열로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div:contains('John')").css("text-decoration", "underline");
});
</script> </head>
<body>
<div>John Resig</div>
<div>George Martin</div>
<div>Malcom John Sinclair</div>
<div>J. Ohn
</body>
</html>
21. :empty Returns: Array<Element>
비엇다. 실행후 원소 배열 반환 Matches all elements that are empty, be it elements or text.
매치된 원소들 중에서 텍스트가 비어있는 것들을 모두 배열로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("td:empty").text("Was empty!").css('background', 'rgb(255,220,200)');
});
</script>
<style>
td { text-align:center; }
</style>
</head>
<body>
<table border="1">
<tr><td>TD #0</td><td></td></tr>
<tr><td>TD #2</td><td></td></tr>
<tr><td></td><td>TD#5</td></tr>
</table>
</body>
</html>
22. :has(selector) Returns: Array<Element>
has(selector), 실행후 원소 배열 반환 Matches elements which contain at least one element that matches the specified selector.
매치된 원소들 중에서 주어진 것을 포함하는 것을 모두 배열로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div:has(p)").addClass("test");
});
</script>
<style>
.test{ border: 3px inset red; }
</style>
</head>
<body>
<div><p>Hello in a paragraph</p></div>
<div>Hello again! (with no paragraph)</div>
</body>
</html>
23. :parent Returns: Array<Element>
부모, 실행후 원소 배열 반환 Matches all elements that are parents - they have child elements, including text.
주어진 것이 부모인 것을 모두 받아온다, 비어있는 것은 포함 안함 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("td:parent").fadeTo(1500, 0.3);
});
</script>
<style>
td { width:40px; background:green; }
</style>
</head>
<body>
<table border="1">
<tr><td>Value 1</td><td></td></tr>
<tr><td>Value 2</td><td></td></tr>
</table>
</body>
</html>
24. :hidden Returns: Array<Element>
안보임, 실행후 원소 배열 반환 Matches all elements that are hidden, or input elements of type "hidden".
보이지 않는 모든 것들을 반환한다. none hidden 등, 추가로 input을 지정하면 인풋타입이 히든인것만 받아온다 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ // in some browsers :hidden includes head, title, script, etc... so limit to body
$("span:first").text("Found " + $(":hidden", document.body).length +
" hidden elements total.");
$("div:hidden").show(3000);
$("span:last").text("Found " + $("input:hidden").length + " hidden inputs."); });
</script>
<style>
div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }
span { display:block; clear:left; color:red; }
.starthidden { display:none; }
</style>
</head>
<body>
<span></span>
<div></div>
<div style="display:none;">Hider!</div>
<div></div>
<div class="starthidden">Hider!</div>
<div></div>
<form>
<input type="hidden" />
<input type="hidden" />
<input type="hidden" />
</form>
<span>
</span>
</body>
</html>
25. :visible Returns: Array<Element>
보임, 실행후 원소 배열 반환 Matches all elements that are visible.
보이는 것들을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div:visible").click(function () {
$(this).css("background", "yellow");
});
$("button").click(function () {
$("div:hidden").show("fast");
}); });
</script>
<style>
div { width:50px; height:40px; margin:5px; border:3px outset green; float:left; }
.starthidden { display:none; }
</style>
</head>
<body>
<button>Show hidden to see they don't change</button>
<div></div>
<div class="starthidden"></div>
<div></div>
<div></div>
<div style="display:none;"></div>
</body>
</html>
26. [attribute] Returns: Array<Element>
속성, 실행후 원소 배열 반환 Matches elements that have the specified attribute.
주어진 속성을 가진 것들을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div[id]").one("click", function(){
var idString = $(this).text() + " = " + $(this).attr("id");
$(this).text(idString);
}); });
</script> </head>
<body>
<div>no id</div>
<div id="hey">with id</div>
<div id="there">has an id</div>
<div>nope</div>
</body>
</html>
27. [attribute=value] Returns: Array<Element>
속성=값, 실행후 원소 배열 반환 Matches elements that have the specified attribute with a certain value.
주어진 속성과 주어진 값이 일치 하는 모든것들을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("input[name='newsletter']").next().text(" is newsletter");
});
</script> </head>
<body>
<div>
<input type="radio" name="newsletter" value="Hot Fuzz" />
<span>name?</span>
</div>
<div>
<input type="radio" name="newsletter" value="Cold Fusion" />
<span>name?</span>
</div>
<div>
<input type="radio" name="accept" value="Evil Plans" />
<span>name?</span>
</div>
</body>
</html>
28. [attribute!=value] Returns: Array<Element>
속성!=값, 실행후 원소 배열 반환 Matches elements that don't have the specified attribute with a certain value.
주어진 속성과 주어진 값이 일치 하지 않는 모든것들을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("input[name!='newsletter']").next().text(" is not newsletter");
});
</script> </head>
<body>
<div>
<input type="radio" name="newsletter" value="Hot Fuzz" />
<span>name?</span>
</div>
<div>
<input type="radio" name="newsletter" value="Cold Fusion" />
<span>name?</span>
</div>
<div>
<input type="radio" name="accept" value="Evil Plans" />
<span>name?</span>
</div>
</body>
</html>
29. [attribute^=value] Returns: Array<Element>
속성^=값, 실행후 원소 배열 반환 Matches elements that have the specified attribute and it starts with a certain value.
주어진 속성을 가지며 값이 주어진 값으로 시작되는 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("input[name^='news']").val("news here!");
});
</script> </head>
<body>
<input name="newsletter" />
<input name="milkman" />
<input name="newsboy" />
</body>
</html>
30. [attribute$=value] Returns: Array<Element>
속성$=값, 실행후 원소 배열 반환 Matches elements that have the specified attribute and it ends with a certain value.
주어진 속성을 가지며 값이 주어진 값으로 끝나는 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("input[name$='letter']").val("a letter");
});
</script> </head>
<body>
<input name="newsletter" />
<input name="milkman" />
<input name="jobletter" />
</body>
</html>
31. [attribute*=value] Returns: Array<Element>
속성*=값, 실행후 원소 배열 반환 Matches elements that have the specified attribute and it contains a certain value.
주어진 속성을 가지며 값이 주어진 값을 포함하는 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("input[name*='man']").val("has man in it!");
});
</script> </head>
<body>
<input name="man-news" />
<input name="milkman" />
<input name="letterman2" />
<input name="newmilk" />
</body>
</html>
32. [selector1][selector2][selectorN] Returns: Array<Element>
속성들, 실행후 원소 배열 반환 Matches elements that have the specified attribute and it contains a certain value.
속성을 여러개 지정할수도 있다. 매치되는 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("input[id][name$='man']").val("only this one");
});
</script> </head>
<body>
<input id="man-news" name="man-news" />
<input name="milkman" />
<input id="letterman" name="new-letterman" />
<input name="newmilk" />
</body>
</html>
33. :nth-child(index/even/odd/equation) Returns: Array<Element>
몇번째 자식, 실행후 원소 배열 반환 Matches the nth-child of its parent or all its even or odd children.
인덱스나 키워드로 자식을 지정하여 매치되는 것은 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("ul li:nth-child(2)").append("<span> - 2nd!</span>");
});
</script>
<style>
div { float:left; }
span { color:blue; }
</style>
</head>
<body>
<div><ul>
<li>John</li>
<li>Karl</li>
<li>Brandon</li>
</ul></div>
<div><ul>
<li>Sam</li>
</ul></div>
<div><ul>
<li>Glen</li>
<li>Tane</li>
<li>Ralph</li>
<li>David</li>
</ul></div>
</body>
</html>
34. :first-child Returns: Array<Element>
첫번째 자식, 실행후 원소 배열 반환 Matches the first child of its parent.
첫번째 자식에 매치되는 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div span:first-child")
.css("text-decoration", "underline")
.hover(function () {
$(this).addClass("sogreen");
}, function () {
$(this).removeClass("sogreen");
}); });
</script>
<style>
span { color:#008; }
span.sogreen { color:green; font-weight: bolder; }
</style>
</head>
<body>
<div>
<span>John,</span>
<span>Karl,</span>
<span>Brandon</span>
</div>
<div>
<span>Glen,</span>
<span>Tane,</span>
<span>Ralph</span>
</div>
</body>
</html>
35. :last-child Returns: Array<Element>
마지막 자식, 실행후 원소 배열 반환 Matches the last child of its parent.
마지막 자식에 매치되는 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div span:last-child")
.css({color:"red", fontSize:"80%"})
.hover(function () {
$(this).addClass("solast");
}, function () {
$(this).removeClass("solast");
}); });
</script>
<style>
span.solast { text-decoration:line-through; }
</style>
</head>
<body>
<div>
<span>John,</span>
<span>Karl,</span>
<span>Brandon,</span>
<span>Sam</span>
</div>
<div>
<span>Glen,</span>
<span>Tane,</span>
<span>Ralph,</span>
<span>David</span>
</div>
</body>
</html>
36. :only-child Returns: Array<Element>
하나의 자식, 실행후 원소 배열 반환 Matches the only child of its parent.
하나의 자식으로만 이루어진 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div button:only-child").text("Alone").css("border", "2px blue solid");
});
</script>
<style>
div { width:100px; height:80px; margin:5px; float:left; background:#b9e }
</style>
</head>
<body>
<div>
<button>Sibling!</button>
<button>Sibling!</button>
</div>
<div>
<button>Sibling!</button>
</div>
<div>
None
</div>
<div>
<button>Sibling!</button>
<button>Sibling!</button>
<button>Sibling!</button>
</div>
<div>
<button>Sibling!</button>
</div>
</body>
</html>
37. :input Returns: Array<Element>
인풋, 실행후 원소 배열 반환 Matches all input, textarea, select and button elements.
인풋, 텍스트에리어, 셀렉트박스, 버튼들을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var allInputs = $(":input");
var formChildren = $("form > *");
$("div").text("Found " + allInputs.length + " inputs and the form has " +
formChildren.length + " children.")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
38. :text Returns: Array<Element>
텍스트, 실행후 원소 배열 반환 Matches all input elements of type text.
인풋타입이 텍스트인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":text").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
39. :password Returns: Array<Element>
패스워드, 실행후 원소 배열 반환 Matches all input elements of type password.
인풋타입이 패스워드인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":password").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
40. :radio Returns: Array<Element>
레디오, 실행후 원소 배열 반환 Matches all input elements of type radio.
인풋타입이 레디오인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":radio").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" name="asdf" />
<input type="radio" name="asdf" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
41. :checkbox Returns: Array<Element>
체크박스, 실행후 원소 배열 반환 Matches all input elements of type checkbox.
인풋타입이 체크박스인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":checkbox").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
42. :submit Returns: Array<Element>
서브밋, 실행후 원소 배열 반환 Matches all input elements of type submit.
인풋타입이 서브밋인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":submit").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
43. :image Returns: Array<Element>
이미지, 실행후 원소 배열 반환 Matches all input elements of type image.
인풋타입이 이미지인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":image").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
44. :reset Returns: Array<Element>
리셋, 실행후 원소 배열 반환 Matches all input elements of type reset.
인풋타입이 리셋인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":reset").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
45. :button Returns: Array<Element>
버튼, 실행후 원소 배열 반환 Matches all input elements of type button.
인풋타입이 버튼인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":button").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
46. :file Returns: Array<Element>
파일, 실행후 원소 배열 반환 Matches all input elements of type file.
인풋타입이 파일인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var input = $(":file").css({background:"yellow", border:"3px red solid"});
$("div").text("For this type jQuery found " + input.length + ".")
.css("color", "red");
$("form").submit(function () { return false; }); // so it won't submit });
</script>
<style>
textarea { height:45px; }
</style>
</head>
<body>
<form>
<input type="button" value="Input Button"/>
<input type="checkbox" />
<input type="file" />
<input type="hidden" />
<input type="image" />
<input type="password" />
<input type="radio" />
<input type="reset" />
<input type="submit" />
<input type="text" />
<select><option>Option<option/></select>
<textarea></textarea>
<button>Button</button>
</form>
<div>
</div>
</body>
</html>
47. :hidden Returns: Array<Element>
히든, 실행후 원소 배열 반환 Matches all elements that are hidden, or input elements of type "hidden".
인풋타입이 히든인 것을 모두 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ // in some browsers :hidden includes head, title, script, etc... so limit to body
$("span:first").text("Found " + $(":hidden", document.body).length +
" hidden elements total.");
$("div:hidden").show(3000);
$("span:last").text("Found " + $("input:hidden").length + " hidden inputs."); });
</script>
<style>
div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }
span { display:block; clear:left; color:red; }
.starthidden { display:none; }
</style>
</head>
<body>
<span></span>
<div></div>
<div style="display:none;">Hider!</div>
<div></div>
<div class="starthidden">Hider!</div>
<div></div>
<form>
<input type="hidden" />
<input type="hidden" />
<input type="hidden" />
</form>
<span>
</span>
</body>
</html>
48. :enabled Returns: Array<Element>
활성화? 사용가능?, 실행후 원소 배열 반환 Matches all elements that are enabled.
활성화된 모든 것들을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("input:enabled").val("this is it");
});
</script> </head>
<body>
<form>
<input name="email" disabled="disabled" />
<input name="id" />
</form>
</body>
</html>
49. :disabled Returns: Array<Element>
비활성화? 사용불가능?, 실행후 원소 배열 반환 Matches all elements that are disabled.
비활성화된 모든 것들을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("input:disabled").val("this is it");
});
</script> </head>
<body>
<form>
<input name="email" disabled="disabled" />
<input name="id" />
</form>
</body>
</html>
50. :checked Returns: Array<Element>
체크?음, 실행후 원소 배열 반환 Matches all elements that are checked.
인풋이 체크된 모든 것들을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ function countChecked() {
var n = $("input:checked").length;
$("div").text(n + (n == 1 ? " is" : " are") + " checked!");
}
countChecked();
$(":checkbox").click(countChecked); });
</script>
<style>
div { color:red; }
</style>
</head>
<body>
<form>
<input type="checkbox" name="newsletter" checked="checked" value="Hourly" />
<input type="checkbox" name="newsletter" value="Daily" />
<input type="checkbox" name="newsletter" value="Weekly" />
<input type="checkbox" name="newsletter" checked="checked" value="Monthly" />
<input type="checkbox" name="newsletter" value="Yearly" />
</form>
<div></div>
</body>
</html>
51. :selected Returns: Array<Element>
선택되어짐, 실행후 원소 배열 반환 Matches all elements that are selected.
선택된 모든 것을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("select").change(function () {
var str = "";
$("select option:selected").each(function () {
str += $(this).text() + " ";
});
$("div").text(str);
})
.trigger('change'); });
</script>
<style>
div { color:red; }
</style>
</head>
<body>
<select name="garden" multiple="multiple">
<option>Flowers</option>
<option selected="selected">Shrubs</option>
<option>Trees</option>
<option selected="selected">Bushes</option>
<option>Grass</option>
<option>Dirt</option>
</select>
<div></div>
</body>
</html>
<Attributes> 닫기" folder_opener="" use_folder="Y" editor_component="quotation" 2266EE?> 1. attr( name ) Returns: Object
속성 실행후 객체 반환 Access a property on the first matched element. This method makes it easy to retrieve a property value from the first matched element. If the element does not have an attribute with such a name, undefined is returned.
주어진 속성명의 값을 가져옴, 매치되는 첫번째 것만 가져옴 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var title = $("em").attr("title");
$("div").text(title); });
</script>
<style>
em { color:blue; font-weight;bold; }
div { color:red; }
</style>
</head>
<body>
<p>
Once there was a <em title="huge, gigantic">large</em> dinosaur...
</p>
The title of the emphasis is:<div></div>
</body>
</html>
2. attr( properties ) Returns: jQuery
attr(속성배열) 실행후 jQuery객체를 반환 Set a key/value object as properties to all matched elements.
속성과 값들의 배열을 지정하여 적용 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("img").attr({
src: "/images/hat.gif",
title: "jQuery",
alt: "jQuery Logo"
});
$("div").text($("img").attr("alt")); });
</script>
<style>
img { padding:10px; }
div { color:red; font-size:24px; }
</style>
</head>
<body>
<img />
<img />
<img />
<div></div>
</body>
</html>
3. attr( key, value ) Returns: jQuery
attr( 속성, 값 ) 실행후 jQuery객체를 반환 Set a single property to a value, on all matched elements.
하나의 속성과 하나의 값만 지정하여 적용 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("button:gt(0)").attr("disabled","disabled");
});
</script>
<style>
button { margin:10px; }
</style>
</head>
<body>
<button>0th Button</button>
<button>1st Button</button>
<button>2nd Button</button>
</body>
</html>
4. attr( key, fn ) Returns: jQuery
attr(속성, 콜백함수) 실행후 jQuery 객체를 반환 Set a single property to a computed value, on all matched elements.
하나의 속성과 콜백함수를 지정하여 적용 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("img").attr("src", function() {
return "/images/" + this.title;
}); });
</script> </head>
<body>
<img title="hat.gif"/>
<img title="hat-old.gif"/>
<img title="hat2-old.gif"/>
</body>
</html>
5. removeAttr( name ) Returns: jQuery
속성 제거 실행후 jQuery 객체를 반환 Remove an attribute from each of the matched elements.
주어진 이름과 매치되는 속성을 제거 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("button").click(function () {
$(this).next().removeAttr("disabled")
.focus()
.val("editable now");
}); });
</script> </head>
<body>
<button>Enable</button>
<input type="text" disabled="disabled" value="can't edit this" />
</body>
</html>
6. addClass( class ) Returns: jQuery
클래스 추가 실행후 jQuery 객체 반환 Adds the specified class(es) to each of the set of matched elements.
주어진 클래스 적용 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p:last").addClass("selected");
});
</script>
<style>
p { margin: 8px; font-size:16px; }
.selected { color:red; }
.highlight { background:yellow; }
</style>
</head>
<body>
<p>Hello</p>
<p>and</p>
<p>Goodbye</p>
</body>
</html>
7. removeClass( class ) Returns: jQuery
클래스 제거 실행후 JQuery 객체를 리턴 Removes all or the specified class(es) from the set of matched elements.
주어진 클래스 제거 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p:even").removeClass("blue");
});
</script>
<style>
p { margin: 4px; font-size:16px; font-weight:bolder; }
.blue { color:blue; }
.under { text-decoration:underline; }
.highlight { background:yellow; }
</style>
</head>
<body>
<p class="blue under">Hello</p>
<p class="blue under highlight">and</p>
<p class="blue under">then</p>
<p class="blue under">Goodbye</p>
</body>
</html>
8. toggleClass( class ) Returns: jQuery
클래스 추가 삭제 반복 실행후 jQuery 객체 리턴 Adds the specified class if it is not present, removes the specified class if it is present.
주어진 클래스를 추가 삭제를 반복한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("p").click(function () {
$(this).toggleClass("highlight");
}); });
</script>
<style>
p { margin: 4px; font-size:16px; font-weight:bolder;
cursor:pointer; }
.blue { color:blue; }
.highlight { background:yellow; }
</style>
</head>
<body>
<p class="blue">Click to toggle</p>
<p class="blue highlight">highlight</p>
<p class="blue">on these</p>
<p class="blue">paragraphs</p>
</body>
</html>
9. html( ) Returns: String
실행후 문자열을 반환 Get the html contents (innerHTML) of the first matched element. This property is not available on XML documents (although it will work for XHTML documents).
선택되어진 객체의 html을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("p").click(function () {
var htmlStr = $(this).html();
$(this).text(htmlStr);
}); });
</script>
<style>
p { margin:8px; font-size:20px; color:blue;
cursor:pointer; }
b { text-decoration:underline; }
button { cursor:pointer; }
</style>
</head>
<body>
<p>
<b>Click</b> to change the <span id="tag">html</span>
</p>
<p>
to a <span id="text">text</span> node.
</p>
<p>
This <button name="nada">button</button> does nothing.
</p>
</body>
</html>
10. html( val ) Returns: jQuery
실행후 jQuery 객체를 반환 Set the html contents of every matched element. This property is not available on XML documents (although it will work for XHTML documents).
매치되는 모든 원소에 주어진 html을 넣는다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div").html("<span class='red'>Hello <b>Again</b></span>");
});
</script>
<style>
.red { color:red; }
</style>
</head>
<body>
<span>Hello</span>
<div></div>
<div></div>
<div></div>
</body>
</html>
11. text( ) Returns: String
실행후 문자열 반환 Get the text contents of all matched elements.
선택되어진 객체의 문자열을 반환한다. 태그는 제외된다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ var str = $("p:first").text();
$("p:last").html(str); });
</script>
<style>
p { color:blue; margin:8px; }
b { color:red; }
</style>
</head>
<body>
<p><b>Test</b> Paragraph.</p>
<p></p>
</body>
</html>
12. text( val ) Returns: jQuery
실행후 jQuery 객체 반환 Set the text contents of all matched elements.
매치되는 모든 원소에 주어진 텍스트를 집어넣는다. html을 넣는다 해도 텍스트화 된다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").text("<b>Some</b> new text.");
});
</script>
<style>
p { color:blue; margin:8px; }
</style>
</head>
<body>
<p>Test Paragraph.</p>
</body>
</html>
13. val( ) Returns: String, Array
실행후 문자열이나 배열로 반환 Get the content of the value attribute of the first matched element.
첫번째 매치되는 원소의 값을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ function displayVals() {
var singleValues = $("#single").val();
var multipleValues = $("#multiple").val() || [];
$("p").html("<b>Single:</b> " +
singleValues +
" <b>Multiple:</b> " +
multipleValues.join(", "));
} $("select").change(displayVals);
displayVals(); });
</script>
<style>
p { color:red; margin:4px; }
b { color:blue; }
</style>
</head>
<body>
<p></p>
<select id="single">
<option>Single</option>
<option>Single2</option>
</select>
<select id="multiple" multiple="multiple">
<option selected="selected">Multiple</option>
<option>Multiple2</option>
<option selected="selected">Multiple3</option>
</select>
</body>
</html>
14. val( val ) Returns: jQuery
jQuery 객체를 반환 Set the value attribute of every matched element.
매치되는 모든 원소에 주어진 값을 적용한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("button").click(function () {
var text = $(this).text();
$("input").val(text);
}); });
</script>
<style>
button { margin:4px; cursor:pointer; }
input { margin:4px; color:blue; }
</style>
</head>
<body>
<div>
<button>Feed</button>
<button>the</button>
<button>Input</button>
</div>
<input type="text" value="click a button" />
</body>
</html>
15. val( val )
반환 없음 Checks, or selects, all the radio buttons, checkboxes, and select options that match the set of values.
체크 박스, 셀렉트 박스 레디오 버튼 셀렉트 옵션 등에 값을 적용
레디오나 체크박스 같은 경우는 값을 여러개 지정하여 할수 있다.
멀티플 같은 경우 배열로서 값을 지정할수 있다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("#single").val("Single2");
$("#multiple").val(["Multiple2", "Multiple3"]);
$("input").val(["check2", "radio1"]); });
</script>
<style>
body { color:blue; }
</style>
</head>
<body>
<select id="single">
<option>Single</option>
<option>Single2</option>
</select>
<select id="multiple" multiple="multiple">
<option selected="selected">Multiple</option>
<option>Multiple2</option>
<option selected="selected">Multiple3</option>
</select><br/>
<input type="checkbox" value="check1"/> check1
<input type="checkbox" value="check2"/> check2
<input type="radio" name="r" value="radio1"/> radio1
<input type="radio" name="r" value="radio2"/> radio2
</body>
</html>
<Traversing> 닫기" folder_opener="" use_folder="Y" editor_component="quotation" 2266EE?> 1. eq( index ) Returns: jQuery
eq(인덱스) 실행후 jQuery 객체 반환 Reduce the set of matched elements to a single element.
매치되는 원소중 인덱스와 일치하는 것 하나만 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div").eq(2).addClass("red"); });
</script>
<style>
div { width:60px; height:60px; margin:10px; float:left;
border:2px solid blue; }
.red { background:red; }
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
2. hasClass( class ) Returns: Boolean
클래스가 있나 없나 실행후 참거짓 리턴 Checks the current selection against a class and returns true, if at least one element of the selection has the given class.
매치되는 원소에 주어진 클래스가 존재하면 참, 아니면 거짓을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div").click(function(){
if ( $(this).hasClass("protected") )
$(this).animate({ left: -10 }, 75)
.animate({ left: 10 }, 75)
.animate({ left: -10 }, 75)
.animate({ left: 10 }, 75)
.animate({ left: 0 }, 75);
}); });
</script>
<style>
div { width: 80px; height: 80px; background: #abc;
position: relative; border: 2px solid black;
margin: 20px 0px; float: left; left:0 }
div.protected { border-color: red; }
span { display:block; float:left; width:20px;
height:20px; }
</style>
</head>
<body>
<span></span><div class="protected"></div>
<span></span><div></div>
<span></span><div></div>
<span></span><div class="protected"></div>
</body>
</html>
3. filter( expr ) Returns: jQuery
실행후 jQuery 객체를 반환 Removes all elements from the set of matched elements that do not match the specified expression(s).
매치되는 원소들중 해당 필터 표현에 맞지 않는 것들은 제거하고 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div").css("background", "#c8ebcc")
.filter(".middle")
.css("border-color", "red"); });
</script>
<style>
div { width:60px; height:60px; margin:5px; float:left;
border:2px white solid;}
</style>
</head>
<body>
<div></div>
<div class="middle"></div>
<div class="middle"></div>
<div class="middle"></div>
<div class="middle"></div>
<div></div>
</body>
</html>
4. filter( fn ) Returns: jQuery
filter(함수) 실행후 jQuery 객체를 반환 Removes all elements from the set of matched elements that does not match the specified function.
매치되는 원소들중 해당 필터 함수에 맞지 않는 것들은 제거하고 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div").css("background", "#b4b0da")
.filter(function (index) {
return index == 1 || $(this).attr("id") == "fourth";
})
.css("border", "3px double red"); });
</script>
<style>
div { width:60px; height:60px; margin:5px; float:left;
border:3px white solid; }
</style>
</head>
<body>
<div id="first"></div>
<div id="second"></div>
<div id="third"></div>
<div id="fourth"></div>
<div id="fifth"></div>
<div id="sixth"></div>
</body>
</html>
5. is( expr ) Returns: Boolean
존재 여부 실행후 참거짓 반환 Checks the current selection against an expression and returns true, if at least one element of the selection fits the given expression.
매치되는 원소들중 주어진 표현식과 비교하여 일치 하면 참, 그렇지 않으면 거짓을 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div").one('click', function () {
if ($(this).is(":first-child")) {
$("p").text("It's the first div.");
} else if ($(this).is(".blue,.red")) {
$("p").text("It's a blue or red div.");
} else if ($(this).is(":contains('Peter')")) {
$("p").text("It's Peter!");
} else {
$("p").html("It's nothing <em>special</em>.");
}
$("p").hide().slideDown("slow");
$(this).css({"border-style": "inset", cursor:"default"});
}); });
</script>
<style>
div { width:60px; height:60px; margin:5px; float:left;
border:4px outset; background:green; text-align:center;
font-weight:bolder; cursor:pointer; }
.blue { background:blue; }
.red { background:red; }
span { color:white; font-size:16px; }
p { color:red; font-weight:bolder; background:yellow;
margin:3px; clear:left; display:none; }
</style>
</head>
<body>
<div></div>
<div class="blue"></div>
<div></div>
<div class="red"></div>
<div><br/><span>Peter</span></div>
<div class="blue"></div>
<p> </p>
</body>
</html>
16. map( callback ) Returns: jQuery
map(콜백함수) 실행후 jQuery 객체 반환 Translate a set of elements in the jQuery object into another set of values in an array (which may, or may not, be elements). <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("p").append( $("input").map(function(){
return $(this).val();
}).get().join(", ") ); });
</script>
<style>
p { color:red; }
</style>
</head>
<body>
<p><b>Values: </b></p>
<form>
<input type="text" name="name" value="John"/>
<input type="text" name="password" value="password"/>
<input type="text" name="url" value="http://ejohn.org/"/>
</form>
</body>
</html>
17. not( expr ) Returns: jQuery
실행후 jQuery 객체 반환 Removes elements matching the specified expression from the set of matched elements.
매치되는 원소들중 표현식과 일치 하는 원소는 제거 하고 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("div").not(".green, #blueone")
.css("border-color", "red"); });
</script>
<style>
div { width:60px; height:60px; margin:10px; float:left;
background:yellow; border:2px solid white; }
.green { background:#8f8; }
.gray {}
#blueone { background:#99f; }
</style>
</head>
<body>
<div></div>
<div id="blueone"></div>
<div></div>
<div class="green"></div>
<div class="green"></div>
<div class="gray"></div>
<div></div>
</body>
</html>
18. slice( start, end ) Returns: jQuery
Selects a subset of the matched elements.
매치되어진 원소들 중에서 해당 시작인덱스와 끝 인덱스의 범위에 있는 인덱스의 원소들을 모두 배열로 반환한다.
끝 인덱스를 지정하지 않으면 시작인덱스 부터 끝까지 배열로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

function colorEm() {
var $div = $("div");
var start = Math.floor(Math.random() *
$div.length);
var end = Math.floor(Math.random() *
($div.length - start)) +
start + 1;
if (end == $div.length) end = undefined;
$div.css("background", "");
if (end)
$div.slice(start, end).css("background", "yellow");
else
$div.slice(start).css("background", "yellow");

$("span").text('$("div").slice(' + start +
(end ? ', ' + end : '') +
').css("background", "yellow");');
} $("button").click(colorEm); });
</script>
<style>
div { width:40px; height:40px; margin:10px; float:left;
border:2px solid blue; }
span { color:red; font-weight:bold; }
button { margin:5px; }
</style>
</head>
<body>
<button>Turn slice yellow</button>
<span>Click the button!</span>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
19. add( expr ) Returns: jQuery
add( expr ), 실행후 jQuery 객체 반환 Adds more elements, matched by the given expression, to the set of matched elements.
매치된 원소에 새로운 원소나 원소들을 추가한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("div").css("border", "2px solid red")
.add("p")
.css("background", "yellow"); });
</script>
<style>
div { width:60px; height:60px; margin:10px; float:left; }
p { clear:left; font-weight:bold; font-size:16px;
color:blue; margin:0 10px; padding:2px; }
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<p>Added this... (notice no border)</p>
</body>
</html>
20. children( expr ) Returns: jQuery
children( expr ), 실행후 jQuery 객체 반환 Get a set of elements containing all of the unique children of each of the matched set of elements.
선택되어진 원소의 자식들을 반환
이해가 잘 안됨 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("#container").click(function (e) {
$("*").removeClass("hilite");
var $kids = $(e.target).children();
var len = $kids.addClass("hilite").length; $("#results span:first").text(len);
$("#results span:last").text(e.target.tagName); e.preventDefault();
return false;
}); });
</script>
<style>
body { font-size:16px; font-weight:bolder; }
div { width:130px; height:82px; margin:10px; float:left;
border:1px solid blue; padding:4px; }
#container { width:auto; height:105px; margin:0; float:none;
border:none; }
.hilite { border-color:red; }
#results { display:block; color:red; }
p { margin:10px; border:1px solid transparent; }
span { color:blue; border:1px solid transparent; }
input { width:100px; }
em { border:1px solid transparent; }
a { border:1px solid transparent; }
b { border:1px solid transparent; }
button { border:1px solid transparent; }
</style>
</head>
<body>
<div id="container">
<div>
<p>This <span>is the <em>way</em> we</span>
write <em>the</em> demo,</p>
</div>
<div>
<a href="#"><b>w</b>rit<b>e</b></a> the <span>demo,</span> <button>write
the</button> demo,
</div>
<div>
This <span>the way we <em>write</em> the <em>demo</em> so</span>
<input type="text" value="early" /> in
</div>
<p>
<span>t</span>he <span>m</span>orning.
<span id="results">Found <span>0</span> children in <span>TAG</span>.</span>
</p>
</div>
</body>
</html>
21. contents( ) Returns: jQuery
contents( ), 실행후 jQuery 객체 반환 Find all the child nodes inside the matched elements (including text nodes), or the content document, if the element is an iframe.
매치된 원소들중에서 비어있지 않는 자식들을 모두 가져옴
이해가 잘 안됨 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").contents().not("[@nodeType=1]").wrap("<b/>");
});
</script>

</head>
<body>
<p>Hello <a href="Johnhttp://ejohn.org/">John</a>, how are you doing?</p>
</body>
</html>
22. find( expr ) Returns: jQuery
find( expr ), 실행후 jQuery 객체 반환 Searches for all elements that match the specified expression. This method is a good way to find additional descendant elements with which to process.
매치되어진 원소들 중에서 주어진 것에 매치되는 것을 찾아 그것들을 모두 배열로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").find("span").css('color','red');
});
</script>

</head>
<body>
<p><span>Hello</span>, how are you?</p>
<p>Me? I'm <span>good</span>.</p>
</body>
</html>
23. next( expr ) Returns: jQuery
next( expr ), 실행후 jQuery 객체 반환 Get a set of elements containing the unique next siblings of each of the matched set of elements.
매치되어진 원소와 형제 관계인 바로 다음 원소를 찾아 객체로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("button").click(function () {
var txt = $(this).text();
$(this).next().text(txt);
}); });
</script>
<style>
span { color:blue; font-weight:bold; }
button { width:100px; }
</style>
</head>
<body>
<div><button>First</button> - <span></span></div>
<div><button>Second</button> - <span></span></div>
<div><button>Third</button> - <span></span></div>
</body>
</html>
24. nextAll( expr ) Returns: jQuery
nextAll( expr ), 실행후 jQuery 객체 반환 Find all sibling elements after the current element.
현재 매치되어진 원소와 형제 관계에 있는 모든 원소를 찾아 객체로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div:first").nextAll().addClass("after");
});
</script>
<style>
div { width: 80px; height: 80px; background: #abc;
border: 2px solid black; margin: 10px; float: left; }
div.after { border-color: red; }
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
25. parent( expr ) Returns: jQuery
parent( expr ), 실행후 jQuery 객체 반환 Get a set of elements containing the unique parents of the matched set of elements.
매치되어진 원소의 유일한 부모를 찾아 객체로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("*", document.body).each(function () {
var parentTag = $(this).parent().get(0).tagName;
$(this).prepend(document.createTextNode(parentTag + " > "));
}); });
</script>
<style>
div,p { margin:10px; }
</style>
</head>
<body>
<div>div,
<span>span, </span>
<b>b </b>
</div>
<p>p,
<span>span,
<em>em </em>
</span>
</p>
<div>div,
<strong>strong,
<span>span, </span>
<em>em,
<b>b, </b>
</em>
</strong>
<b>b </b>
</div>
</body>
</html>
26. parents( expr ) Returns: jQuery
parents( expr ), 실행후 jQuery 객체 반환 Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element).
매치되어진 원소의 유일한 조상들을 찾아 객체로 반환한다. The matched elements can be filtered with an optional expression. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

var parentEls = $("b").parents()
.map(function () {
return this.tagName;
})
.get().join(", ");
$("b").append("<strong>" + parentEls + "</strong>"); });
</script>
<style>
b { color:blue; }
strong { color:red; }
</style>
</head>
<body>
<div>
<p>
<span>
<b>My parents are: </b>
</span>
</p>
</div>
</body>
</html>

27. prev( expr ) Returns: jQuery
prev( expr ), 실행후 jQuery 객체 반환 Get a set of elements containing the unique previous siblings of each of the matched set of elements.
매치되어진 원소 보다 앞에 있는 유니크한 형제 원소를 찾아 객체로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

var $curr = $("#start");
$curr.css("background", "#f99");
$("button").click(function () {
$curr = $curr.prev();
$("div").css("background", "");
$curr.css("background", "#f99");
}); });
</script>
<style>
div { width:40px; height:40px; margin:10px;
float:left; border:2px blue solid;
padding:2px; }
span { font-size:14px; }
p { clear:left; margin:10px; }
</style>
</head>
<body>
<div></div>
<div></div>
<div><span>has child</span></div>
<div></div>
<div></div>
<div></div>
<div id="start"></div>
<div></div>
<p><button>Go to Prev</button></p>
</body>
</html>
28. prevAll( expr ) Returns: jQuery
prevAll( expr ), 실행후 jQuery 객체 반환 Find all sibling elements before the current element.
매치되어진 원소보다 이전에 있는 모든 형제 원소를 찾아 객체로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div:last").prevAll().addClass("before");
});
</script>
<style>
div { width:70px; height:70px; background:#abc;
border:2px solid black; margin:10px; float:left; }
div.before { border-color: red; }
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
29. siblings( expr ) Returns: jQuery
siblings( expr ), 실행후 jQuery 객체 반환 Get a set of elements containing all of the unique siblings of each of the matched set of elements.
매치되어진 원소들의 모든 형제 원소들을 찾아 반환한다. Can be filtered with an optional expressions. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

var len = $(".hilite").siblings()
.css("color", "red")
.length;
$("b").text(len); });
</script>
<style>
ul { float:left; margin:5px; font-size:16px; font-weight:bold; }
p { color:blue; margin:10px 20px; font-size:16px; padding:5px;
font-weight:bolder; }
.hilite { background:yellow; }
</style>
</head>
<body>
<ul>
<li>One</li>
<li>Two</li>
<li class="hilite">Three</li>
<li>Four</li>
</ul>
<ul>
<li>Five</li>
<li>Six</li>
<li>Seven</li>
</ul>
<ul>
<li>Eight</li>
<li class="hilite">Nine</li>
<li>Ten</li>
<li class="hilite">Eleven</li>
</ul>
<p>Unique siblings: <b></b></p>
</body>
</html>
30. andSelf( ) Returns: jQuery
andSelf( ), 실행후 jQuery 객체 반환 Add the previous selection to the current selection.
매치되어진 원소들의 상위의 형제 원소들과 조상 원소 모두를 찾아 추가하여 객체로 반환한다.
이해가 잘 안됨 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("div").find("p").andSelf().addClass("border");
$("div").find("p").addClass("background"); });
</script>
<style>
p, div { margin:5px; padding:5px; }
.border { border: 2px solid red; }
.background { background:yellow; }
</style>
</head>
<body>
<div>
<p>First Paragraph</p>
<p>Second Paragraph</p>
</div>
</body>
</html>
31. end( ) Returns: jQuery
end( ), 실행후 jQuery 객체 반환 Revert the most recent 'destructive' operation, changing the set of matched elements to its previous state (right before the destructive operation).
현재 보다 이전의 매치상태로 돌아가서 객체를 반환
잘 이해가 안됨 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

jQuery.fn.showTags = function (n) {
var tags = this.map(function () {
return this.tagName;
})
.get().join(", ");
$("b:eq(" + n + ")").text(tags);
return this;
}; $("p").showTags(0)
.find("span")
.showTags(1)
.css("background", "yellow")
.end()
.showTags(2)
.css("font-style", "italic"); });
</script>
<style>
p, div { margin:1px; padding:1px; font-weight:bold;
font-size:16px; }
div { color:blue; }
b { color:red; }
</style>
</head>
<body>
<p>
Hi there <span>how</span> are you <span>doing</span>?
</p>
<p>
This <span>span</span> is one of
several <span>spans</span> in this
<span>sentence</span>.
</p>
<div>
Tags in jQuery object initially: <b></b>
</div>
<div>
Tags in jQuery object after find: <b></b>
</div>
<div>
Tags in jQuery object after end: <b></b>
</div>
</body>
</html>


<Manipulation> 닫기" folder_opener="" use_folder="Y" editor_component="quotation" 2266EE?> 1. html( ) Returns: String
html( ), 실행후 문자열 반환 Get the html contents (innerHTML) of the first matched element. This property is not available on XML documents (although it will work for XHTML documents).
매치되어진 첫번째 원소의 html을 가져와서 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("p").click(function () {
var htmlStr = $(this).html();
$(this).text(htmlStr);
}); });
</script>
<style>
p { margin:8px; font-size:20px; color:blue;
cursor:pointer; }
b { text-decoration:underline; }
button { cursor:pointer; }
</style>
</head>
<body>
<p>
<b>Click</b> to change the <span id="tag">html</span>
</p>
<p>
to a <span id="text">text</span> node.
</p>
<p>
This <button name="nada">button</button> does nothing.
</p>
</body>
</html>

2. html( val ) Returns: jQuery
html( val ), 실행후 jQuery 객체 반환 Set the html contents of every matched element. This property is not available on XML documents (although it will work for XHTML documents). 매치되는 모든 원소들에게 주어진 html을 삽입하고 객체를 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("div").html("<span class='red'>Hello <b>Again</b></span>");
});
</script>
<style>
.red { color:red; }
</style>
</head>
<body>
<span>Hello</span>
<div></div>
<div></div>
<div></div>
</body>
</html>
3. text( ) Returns: String
text( ), 실행후 문자열 반환 Get the text contents of all matched elements.
매치되어진 원소의 태그를 제외한 문자열만 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

var str = $("p:first").text();
$("p:last").html(str); });
</script>
<style>
p { color:blue; margin:8px; }
b { color:red; }
</style>
</head>
<body>
<p><b>Test</b> Paragraph.</p>
<p></p>
</body>
</html>
4. text( val ) Returns: jQuery
text( val ), 실행후 jQuery 객체 반환 Set the text contents of all matched elements.
매치된 원소들에 주어진 문자열을 삽입하고 객체를 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").text("<b>Some</b> new text.");
});
</script>
<style>
p { color:blue; margin:8px; }
</style>
</head>
<body>
<p>Test Paragraph.</p>
</body>
</html>
5. append( content ) Returns: jQuery
append( content ) , 실행후 jQuery 객체 반환 Append content to the inside of every matched element.
매치되어진 원소에 주어진 내용을 추가로 삽입한 후 객체 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").append("<b>Hello</b>");
});
</script>
<style>p { background:yellow; }</style>
</head>
<body>
<p>I would like to say: </p>
</body>
</html>
6. appendTo( content ) Returns: jQuery
appendTo( content ), 실행후 jQuery 객체 반환 Append all of the matched elements to another, specified, set of elements.
매치되어진 원소들의 내용들을 주어진 조건에 맞는 원소에 추가로 삽입한후 객체 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("span").appendTo("#foo"); // check append() examples
});
</script>
<style>#foo { background:yellow; }</style>
</head>
<body>
<span>I have nothing more to say... </span>
<div id="foo">FOO! </div>
</body>
</html>
7. prepend( content ) Returns: jQuery
prepend( content ), 실행후 jQuery 객체 반환 Prepend content to the inside of every matched element.
매치되어진 원소들에 맨앞에 주어진 내용을 삽입한후 객체를 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").prepend("<b>Hello </b>");
});
</script>
<style>p { background:yellow; }</style>
</head>
<body>
<p>there friend!</p>
<p>amigo!</p>
</body>
</html>
8. prependTo( content ) Returns: jQuery
prependTo( content ) 실행후 jQuery 객체 반환 Prepend all of the matched elements to another, specified, set of elements.
매?되어진 원소의 내용을 주어진 것에 매치되는 원소의 맨앞에 추가 삽입한후 객체를 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("span").prependTo("#foo"); // check prepend() examples
});
</script>
<style>div { background:yellow; }</style>
</head>
<body>
<div id="foo">FOO!</div>
<span>I have something to say... </span>
</body>
</html>
9. after( content ) Returns: jQuery
after( content ), 실행후 jQuery 객체를 반환 Insert content after each of the matched elements.
매치되는 모든 원소의 뒤에 주어진 내용을 삽입 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").after("<b>Hello</b>");
});
</script>
<style>p { background:yellow; }</style>
</head>
<body>
<p>I would like to say: </p>
</body>
</html>
10. before( content ) Returns: jQuery
before( content ) 실행후 jQuery 객체를 반환 Insert content before each of the matched elements. 매치되는 모는 원소의 앞에 주어진 내용 삽입
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").before("<b>Hello</b>");
});
</script>
<style>p { background:yellow; }</style>
</head>
<body>
<p> is what I said...</p>
</body>
</html>
11. insertAfter( content ) Returns: jQuery
insertAfter( content ), 실행후 jQuery 객체 반환 Insert all of the matched elements after another, specified, set of elements.
매치되어진 원소들을 주어진 것에 매치되는 원소의 뒤에 삽입한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").insertAfter("#foo"); // check after() examples
});
</script>
<style>#foo { background:yellow; }</style>
</head>
<body>
<p> is what I said... </p><div id="foo">FOO!</div>
</body>
</html>
12. insertBefore( content ) Returns: jQuery
insertBefore( content ), 실행후 jQuery 객체 반환 Insert all of the matched elements before another, specified, set of elements.
매치되어진 원소앞에 주어진 것에 매치된 원소를 삽입한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").insertBefore("#foo"); // check before() examples
});
</script>
<style>#foo { background:yellow; }</style>
</head>
<body>
<div id="foo">FOO!</div><p>I would like to say: </p>
</body>
</html>
13. wrap( html ) Returns: jQuery
wrap( html ), 실행후 jQuery 객체를 반환 Wrap all matched elements with a structure of other elements.
매치되어진 원소를 주어진 html로서 감싼후 객체를 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("span").wrap("<div><div><p><em><b></b></em></p></div></div>");
});
</script>
<style>
div { border:2px blue solid; margin:2px; padding:2px; }
p { background:yellow; margin:2px; padding:2px; }
</style>
</head>
<body>
<span>Span Text</span>
<span>Another One</span>
</body>
</html>
14. wrap( elem ) Returns: jQuery
wrap( elem ), 실행후 jQuery 객체 반환 Wrap all matched elements with a structure of other elements.
매치된 모든 원소를 주어진것에 매치되는 원소로 감싼다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").wrap(document.getElementById('content'));
});
</script>
<style>#content { background:#9f9; }</style>
</head>
<body>
<p>Test Paragraph.</p><div id="content"></div>
</body>
</html>
15. wrapAll( html ) Returns: jQuery
wrapAll( html ) 실행후 jQuery 객체 반환 Wrap all the elements in the matched set into a single wrapper element.
매치되는 원소들을 주어진 html로 모두 하나로 감싼다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("span").wrapAll("<div><div><p><em><b></b></em></p></div></div>");
});
</script>
<style>
div { border:2px blue solid; margin:2px; padding:2px; }
p { background:yellow; margin:2px; padding:2px; }
strong { color:red; }
</style>
</head>
<body>
<span>Span Text</span>
<strong>What about me?</strong>
<span>Another One</span>
</body>
</html>
16. wrapAll( elem ) Returns: jQuery
wrapAll( elem ), 실행후 jQuery 객체 반환 Wrap all the elements in the matched set into a single wrapper element.
매치되어진 원소들을 주어진 것에 매치되는 것으로 하나로 감싼다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").wrapAll(document.createElement("div"));
});
</script>
<style>
div { border: 2px solid blue; }
p { background:yellow; margin:4px; }
</style>
</head>
<body>
<p>Hello</p>
<p>cruel</p>
<p>World</p>
</body>
</html>

17. wrapInner( html ) Returns: jQuery
wrapInner( html ), 실행후 jQuery 객체 반환 Wrap the inner child contents of each matched element (including text nodes) with an HTML structure.
매치되어진 원소 속의 내용을 주어진 것으로 감싼다 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("body").wrapInner("<div><div><p><em><b></b></em></p></div></div>");
});
</script>
<style>
div { border:2px green solid; margin:2px; padding:2px; }
p { background:yellow; margin:2px; padding:2px; }
</style>
</head>
<body>
Plain old text, or is it?
</body>
</html>
18. wrapInner( elem ) Returns: jQuery
wrapInner( elem ), 실행후 jQuery 객체를 반환 Wrap the inner child contents of each matched element (including text nodes) with a DOM element.
매치되어진 원소 속의 내용을 주어진 것에 매치된것으로 감싼다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").wrapInner(document.createElement("b"));
});
</script>
<style>p { background:#9f9; }</style>
</head>
<body>
<p>Hello</p>
<p>cruel</p>
<p>World</p>
</body>
</html>
19. replaceWith( content ) Returns: jQuery
replaceWith( content ), 실행후 jQuery 객체 반환 Replaces all matched elements with the specified HTML or DOM elements.
매치되어진 원소를 주어진 내용과 치환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("button").click(function () {
$(this).replaceWith("<div>" + $(this).text() + "</div>");
}); });
</script>
<style>
button { display:block; margin:3px; color:red; width:200px; }
div { color:red; border:2px solid blue; width:200px;
margin:3px; text-align:center; }
</style>
</head>
<body>
<button>First</button>
<button>Second</button>
<button>Third</button>
</body>
</html>
20. replaceAll( selector ) Returns: jQuery
replaceAll( selector ), 실행후 jQuery 객체 반환 Replaces the elements matched by the specified selector with the matched elements.
매치되어진 것들을 주어진 것에 매치되는 것에 모두 바꿈 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("<b>Paragraph. </b>").replaceAll("p"); // check replaceWith() examples
});
</script>

</head>
<body>
<p>Hello</p>
<p>cruel</p>
<p>World</p>
</body>
</html>
21. empty( ) Returns: jQuery
empty( ) 실행후 jQuery 객체 반환 Remove all child nodes from the set of matched elements.
매치되어진 모든 것들을 없앤다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("button").click(function () {
$("p").empty();
}); });
</script>
<style>
p { background:yellow; }
</style>
</head>
<body>
<p>
Hello, <span>Person</span> <a href=";">and person</a>
</p>
<button>Call empty() on above paragraph</button>
</body>
</html>
22. remove( expr ) Returns: jQuery
remove( expr ), 실행후 jQuery 객체를 반환 Removes all matched elements from the DOM.
매치되는 모든 원소를 옮기다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("button").click(function () {
$("p").remove();
}); });
</script>
<style>p { background:yellow; margin:6px 0; }</style>
</head>
<body>
<p>Hello</p>
how are
<p>you?</p>
<button>Call remove() on paragraphs
</body>
</html>
23. clone( ) Returns: jQuery
clone( ) 실행후 jQuery 객체 반환 Clone matched DOM Elements and select the clones.
선택되어진 원소를 복사 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("b").clone().prependTo("p");
});
</script>

</head>
<body>
<b>Hello</b><p>, how are you?</p>
</body>
</html>
24. clone( true ) Returns: jQuery
clone( true ) 실행후 jQuery 객체 반환 Clone matched DOM Elements, and all their event handlers, and select the clones.
완벽한 복사 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("button").click(function(){
$(this).clone(true).insertAfter(this);
}); });
</script>

</head>
<body>
<button>Clone Me!</button>
</body>
</html>


<CSS> 닫기" folder_opener="" use_folder="Y" editor_component="quotation" 2266EE?> 1. css( name ) Returns: String
css( name ) 실행후 문자열 반환 Return a style property on the first matched element.
매치된 원소에서 주어진 스타일 속성이 발견되면 그 값을 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("div").click(function () {
var color = $(this).css("background-color");
$("#result").html("That div is <span style='color:" +
color + ";'>" + color + "</span>.");
}); });
</script>
<style>
div { width:60px; height:60px; margin:5px; float:left; }
</style>
</head>
<body>
<span id="result"> </span>
<div style="background-color:blue;"></div>
<div style="background-color:rgb(15,99,30);"></div>
<div style="background-color:#123456;"></div>
<div style="background-color:#f11;"></div>
</body>
</html>
2. css( properties ) Returns: jQuery
css( properties ) 실행후 jQuery 객체 반환 Set a key/value object as style properties to all matched elements.
매치되어진 모든 원소에 주어진 키와 값으로 이루어진 속성들의 배열의 스타일을 적용하고 객체를 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("p").hover(function () {
$(this).css({ "background-color":"yellow", "font-weight":"bolder" });
}, function () {
var cssObj = {
"background-color": "#ddd",
"font-weight": "",
color: "rgb(0,40,244)"
}
$(this).css(cssObj);
}); });
</script>
<style>
p { color:green; }
</style>
</head>
<body>
<p>
Move the mouse over a paragraph.
</p>
<p>
Like this one or the one above.
</p>
</body>
</html>
3. css( name, value ) Returns: jQuery
css( name, value ) 실행후 jQuery 객체 반환 Set a single style property to a value on all matched elements.
하나의 속성과 값을 받아 매치되어진 모든 원소에 적용 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("p").mouseover(function () {
$(this).css("color","red");
}); });
</script>
<style>
p { color:blue; width:200px; font-size:14px; }
</style>
</head>
<body>
<p>
Just roll the mouse over me.
</p>
<p>
Or me to see a color change.
</p>
</body>
</html>
4. offset( ) Returns: Object{top,left}
offset( ) 실행후 탑과 레프트에 해당하는 위치 정보를 반환 Get the current offset of the first matched element relative to the viewport. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
var p = $("p:last");
var offset = p.offset();
p.html( "left: " + offset.left + ", top: " + offset.top );
});
</script>
<style>
p { margin-left:10px; }
</style>
</head>
<body>
<p>Hello</p><p>2nd Paragraph</p>
</body>
</html>
5. height( ) Returns: Integer
height( ) 실행후 정수형을 반환한다. Get the current computed, pixel, height of the first matched element.
매치된 첫번째 원소의 높이를 픽셀로 반환한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

function showHeight(ele, h) {
$("div").text("The height for the " + ele +
" is " + h + "px.");
}
$("#getp").click(function () {
showHeight("paragraph", $("p").height());
});
$("#getd").click(function () {
showHeight("document", $(document).height());
});
$("#getw").click(function () {
showHeight("window", $(window).height());
}); });
</script>
<style>
body { background:yellow; }
button { font-size:12px; margin:2px; }
p { width:150px; border:1px red solid; }
div { color:red; font-weight:bold; }
</style>
</head>
<body>
<button id="getp">Get Paragraph Height</button>
<button id="getd">Get Document Height</button>
<button id="getw">Get Window Height</button>
<div> </div>
<p>
Sample paragraph to test height
</p>
</body>
</html>
6. height( val ) Returns: jQuery
height( val ) 실행후 jQuery 객체 반환 Set the CSS height of every matched element.
매치되는 모든 원소에 주어진 높이를 적용한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("div").one('click', function () {
$(this).height(30)
.css({cursor:"auto", backgroundColor:"green"});
}); });
</script>
<style>
div { width:50px; height:70px; float:left; margin:5px;
background:rgb(255,140,0); cursor:pointer; }
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
7. width( ) Returns: Integer
width( ) 실행후 정수형을 반환 Get the current computed, pixel, width of the first matched element.
매치되는 첫번째 원소의 너비를 픽셀로 반환 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

function showWidth(ele, w) {
$("div").text("The width for the " + ele +
" is " + w + "px.");
}
$("#getp").click(function () {
showWidth("paragraph", $("p").width());
});
$("#getd").click(function () {
showWidth("document", $(document).width());
});
$("#getw").click(function () {
showWidth("window", $(window).width());
}); });
</script>
<style>
body { background:yellow; }
button { font-size:12px; margin:2px; }
p { width:150px; border:1px red solid; }
div { color:red; font-weight:bold; }
</style>
</head>
<body>
<button id="getp">Get Paragraph Width</button>
<button id="getd">Get Document Width</button>
<button id="getw">Get Window Width</button>
<div> </div>
<p>
Sample paragraph to test width
</p>
</body>
</html> 8. width( val ) Returns: jQuery
width( val ) 실행후 jQuery 객체를 반환 Set the CSS width of every matched element.
매치되는 모든 원소에 주어진 너비를 적용한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("div").one('click', function () {
$(this).width(30)
.css({cursor:"auto", "background-color":"blue"});
}); });
</script>
<style>
div { width:70px; height:50px; float:left; margin:5px;
background:red; cursor:pointer; }
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>


<Events> 닫기" folder_opener="" use_folder="Y" editor_component="quotation" 2266ee?> 1. ready( fn ) Returns: jQuery
ready( fn ) 실행후 jQuery 객체를 반환 Binds a function to be executed whenever the DOM is ready to be traversed and manipulated.
문서가 준비가 되면 그 시점에 함수를 실행시킨다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").text("The DOM is now loaded and can be manipulated.");
});
</script>
<style>p { color:red; }</style>
</head>
<body>
<p>
</p>
</body>
</html>
2. bind( type, data, fn ) Returns: jQuery
bind( type, data, fn ) 실행후 jQuery 객체를 반환 Binds a handler to a particular event (like click) for each matched element.
지정된 이벤트가 일어날때까지 기다렷다가 함수 실행 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("p").bind("click", function(e){
var str = "( " + e.pageX + ", " + e.pageY + " )";
$("span").text("Click happened! " + str);
});
$("p").bind("dblclick", function(){
$("span").text("Double-click happened in " + this.tagName);
}); });
</script>
<style>
p { background:yellow; font-weight:bold; cursor:pointer;
padding:5px; }
span { color:red; }
</style>
</head>
<body>
<p>Click or double click here.</p>
<span></span>
</body>
</html>
3. one( type, data, fn ) Returns: jQuery
one( type, data, fn ) 실행후 jQuery 객체 반환 Binds a handler to a particular event to be executed once for each matched element.
지정된 이벤트가 일어날때까지 기다렷다가 한번만 실행 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

var n = 0;
$("div").one("click", function(){
var index = $("div").index(this);
$(this).css({ borderStyle:"inset",
cursor:"auto" });
$("p").text("Div at index #" + index + " clicked." +
" That's " + ++n + " total clicks.");
}); });
</script>
<style>
div { width:60px; height:60px; margin:5px; float:left;
background:green; border:10px outset;
cursor:pointer; }
p { color:red; margin:0; clear:left; }
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<p>Click a green square...</p>
</body>
</html>
4. trigger( type, data ) Returns: jQuery
trigger( type, data ) 실행후 jQuery 객체 반환 Trigger a type of event on every matched element.
매치되는 모든 원소에 지정된 타입의 이벤트를 발생시킨다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("button:first").click(function () {
update($("span:first"));
});
$("button:last").click(function () {
$("button:first").trigger('click'); update($("span:last"));
}); function update(j) {
var n = parseInt(j.text(), 0);
j.text(n + 1);
} });
</script>
<style>
button { margin:10px; }
div { color:blue; font-weight:bold; }
span { color:red; }
</style>
</head>
<body>
<button>Button #1</button>
<button>Button #2</button>
<div><span>0</span> button #1 clicks.</div>
<div><span>0</span> button #2 clicks.</div>
</body>
</html>
5. triggerHandler( type, data ) Returns: jQuery
triggerHandler( type, data ) 실행후 jQuery객체 반환 This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.
잘은 모르겟지만 실제적인 행위는 하지 않고 그결과만 실행한다는 뜻인것 같음 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("#old").click(function(){
$("input").trigger("focus");
});
$("#new").click(function(){
$("input").triggerHandler("focus");
});
$("input").focus(function(){
$("<span>Focused!</span>").appendTo("body").fadeOut(1000);
}); });
</script>

</head>
<body>
<button id="old">.trigger("focus")</button>
<button id="new">.triggerHandler("focus")</button><br/><br/>
<input type="text" value="To Be Focused"/>
</body>
</html>

6. unbind( type, data ) Returns: jQuery
unbind( type, data ), 실행후 jQuery 객체 반환 This does the opposite of bind, it removes bound events from each of the matched elements.
bind와 정반대의 역활을 하며 매치되는 모든 원소에 바운드 이벤트를 제거한다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

function aClick() {
$("div").show().fadeOut("slow");
}
$("#bind").click(function () {
// could use .bind('click', aClick) instead but for variety...
$("#theone").click(aClick)
.text("Can Click!");
});
$("#unbind").click(function () {
$("#theone").unbind('click', aClick)
.text("Does nothing...");
}); });
</script>
<style>
button { margin:5px; }
button#theone { color:red; background:yellow; }
</style>
</head>
<body>
<button id="theone">Does nothing...</button>
<button id="bind">Bind Click</button>
<button id="unbind">Unbind Click</button>
<div style="display:none;">Click!</div>
</body>
</html>
7. hover( over, out ) Returns: jQuery
hover( over, out ) 실행후 jQuery 객체를 반환 Simulates hovering (moving the mouse on, and off, an object). This is a custom method which provides an 'in' to a frequent task.
마우스 오버와 아웃시 행위를 지정할수 있다. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("li").hover(
function () {
$(this).append($("<span> ***</span>"));
},
function () {
$(this).find("span:last").remove();
}
); });
</script>
<style>
ul { margin-left:20px; color:blue; }
li { cursor:default; }
span { color:red; }
</style>
</head>
<body>
<ul>
<li>Milk</li>
<li>Bread</li>
<li>Chips</li>
<li>Socks</li>
</ul>
</body>
8. toggle( fn, fn ) Returns: jQuery
toggle( fn, fn ) 실행후 jQuery 객체 반환 Toggle between two function calls every other click.
클릭시 두개의 함수를 반복적으로 실행 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("li").toggle(
function () {
$(this).css("list-style-type", "disc")
.css("color", "blue");
},
function () {
$(this).css({"list-style-type":"", "color":""});
}
); });
</script>
<style>
ul { margin:10px; list-style:inside circle; font-weight:bold; }
li { cursor:pointer; }
</style>
</head>
<body>
<ul>
<li>Go to the store</li>
<li>Pick up dinner</li>
<li>Debug crash</li>
<li>Take a jog</li>
</ul>
</body>
</html>
9. blur( ) Returns: jQuery
blur( ) 실행후 jQuery 객체 반환 Triggers the blur event of each matched element.
10. blur( fn ) Returns: jQuery
blur( fn ) 실행후 jQuery 객체 반환 Bind a function to the blur event of each matched element.

11. change( ) Returns: jQuery
change( ) 실행후 jQuery 객체 반환 Triggers the change event of each matched element.
12. change( fn ) Returns: jQuery
change( fn ) 실행후 jQuery 객체 반환 Binds a function to the change event of each matched element. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("select").change(function () {
var str = "";
$("select option:selected").each(function () {
str += $(this).text() + " ";
});
$("div").text(str);
})
.change(); });
</script>
<style>
div { color:red; }
</style>
</head>
<body>
<select name="sweets" multiple="multiple">
<option>Chocolate</option>
<option selected="selected">Candy</option>
<option>Taffy</option>
<option selected="selected">Carmel</option>
<option>Fudge</option>
<option>Cookie</option>
</select>
<div></div>
</body>
</html>
13. click( ) Returns: jQuery
click( ) 실행후 jQuery 객체 반환 Triggers the click event of each matched element.
14. click( fn ) Returns: jQuery
click( fn ) 실행후 jQuery 객체 반환 Binds a function to the click event of each matched element. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){

$("p").click(function () {
$(this).slideUp();
});
$("p").hover(function () {
$(this).addClass("hilite");
}, function () {
$(this).removeClass("hilite");
}); });
</script>
<style>
p { color:red; margin:5px; cursor:pointer; }
p.hilite { background:yellow; }
</style>
</head>
<body>
<p>First Paragraph</p>
<p>Second Paragraph</p>
<p>Yet one more Paragraph</p>
</body>
</html>
15. dblclick( ) Returns: jQuery
dblclick( ) 실행후 jQuery 객체를 리턴 Triggers the dblclick event of each matched element.
16. dblclick( fn ) Returns: jQuery
dblclick( fn ) 실행후 jQuery 객체를 리턴 Binds a function to the dblclick event of each matched element.
17. error( ) Returns: jQuery
Triggers the error event of each matched element.
18. error( fn ) Returns: jQuery
Binds a function to the error event of each matched element.

19. focus( ) Returns: jQuery
Triggers the focus event of each matched element. 20. focus( fn ) Returns: jQuery
Binds a function to the focus event of each matched element.

21. keydown( ) Returns: jQuery
Triggers the keydown event of each matched element. 22. keydown( fn ) Returns: jQuery
Bind a function to the keydown event of each matched element.

23. keypress( ) Returns: jQuery
Triggers the keypress event of each matched element. 24. keypress( fn ) Returns: jQuery
Binds a function to the keypress event of each matched element.

25. keyup( ) Returns: jQuery
Triggers the keyup event of each matched element. 26. keyup( fn ) Returns: jQuery
Bind a function to the keyup event of each matched element.
27. load( fn ) Returns: jQuery
Binds a function to the load event of each matched element.

28. mousedown( fn ) Returns: jQuery
Binds a function to the mousedown event of each matched element.
29. mousemove( fn ) Returns: jQuery
Bind a function to the mousemove event of each matched element.
30. mouseout( fn ) Returns: jQuery
Bind a function to the mouseout event of each matched element.
31. mouseover( fn ) Returns: jQuery
Bind a function to the mouseover event of each matched element.
32. mouseup( fn ) Returns: jQuery
Bind a function to the mouseup event of each matched element.
33. resize( fn ) Returns: jQuery
Bind a function to the resize event of each matched element.

34. scroll( fn ) Returns: jQuery
Bind a function to the scroll event of each matched element.

35. select( ) Returns: jQuery
Trigger the select event of each matched element. 36. select( fn ) Returns: jQuery
Bind a function to the select event of each matched element.

37. submit( ) Returns: jQuery
Trigger the submit event of each matched element. 38. submit( fn ) Returns: jQuery
Bind a function to the submit event of each matched element.

39. unload( fn ) Returns: jQuery
Binds a function to the unload event of each matched element.



<Effect> 닫기" folder_opener="" use_folder="Y" editor_component="quotation" 2266EE?> 1. show( ) Returns: jQuery
Displays each of the set of matched elements if they are hidden. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$("p").show()
});
</script> </head>
<body>
<p style="display:none">Hello</p>
</body>
</html>
2. show( speed, callback ) Returns: jQuery
Show all matched elements using a graceful animation and firing an optional callback after completion.
##A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000). <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("button").click(function () {
$("p").show("slow");
}); });
</script>
<style>
p { background:yellow; }
</style>
</head>
<body>
<button>Show it</button>
<p style="display: none">Hello</p>
</body>
</html>
3. hide( ) Returns: jQuery
Hides each of the set of matched elements if they are shown. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("p").hide();
$("a").click(function () {
$(this).hide();
return false;
}); });
</script> </head>
<body>
<p>Hello</p>
<a href="#">Click to hide me too</a>
<p>Here is another paragraph</p>
</body>
</html>
4. hide( speed, callback ) Returns: jQuery
Hide all matched elements using a graceful animation and firing an optional callback after completion. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("button").click(function () {
$("p").hide("slow");
}); });
</script>
<style>
p { background:#dad; font-weight:bold; }
</style>
</head>
<body>
<button>Hide 'em</button>
<p>Hiya</p>
<p>Such interesting text, eh?</p>
</body>
</html>
5. toggle( ) Returns: jQuery
Toggles each of the set of matched elements. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("button").click(function () {
$("p").toggle();
}); });
</script> </head>
<body>
<button>Toggle</button>
<p>Hello</p>
<p style="display: none">Good Bye</p>
</body>
</html>
6. slideDown( speed, callback ) Returns: jQuery
Reveal all matched elements by adjusting their height and firing an optional callback after completion. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $(document.body).click(function () {
if ($("div:first").is(":hidden")) {
$("div").slideDown("slow");
} else {
$("div").hide();
}
}); });
</script>
<style>
div { background:#de9a44; margin:3px; width:80px;
height:40px; display:none; float:left; }
</style>
</head>
<body>
Click me!
<div></div>
<div></div>
<div></div>
</body>
</html>
7. slideUp( speed, callback ) Returns: jQuery
Hide all matched elements by adjusting their height and firing an optional callback after completion. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $(document.body).click(function () {
if ($("div:first").is(":hidden")) {
$("div").show("fast");
} else {
$("div").slideUp();
}
}); });
</script>
<style>
div { background:#3d9a44; margin:3px; width:80px;
height:40px; float:left; }
</style>
</head>
<body>
Click me!
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>


8. slideToggle( speed, callback ) Returns: jQuery
Toggle the visibility of all matched elements by adjusting their height and firing an optional callback after completion. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("button").click(function () {
$("p").slideToggle("slow");
}); });
</script>
<style>
p { width:400px; }
</style>
</head>
<body>
<button>Toggle</button>
<p>
This is the paragraph to end all paragraphs. You
should feel <em>lucky</em> to have seen such a paragraph in
your life. Congratulations!
</p>
</body>
</html>
9. fadeIn( speed, callback ) Returns: jQuery
Fade in all matched elements by adjusting their opacity and firing an optional callback after completion. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $(document.body).click(function () {
$("div:hidden:first").fadeIn("slow");
}); });
</script>
<style>
span { color:red; cursor:pointer; }
div { margin:3px; width:80px; display:none;
height:80px; float:left; }
div#one { background:#f00; }
div#two { background:#0f0; }
div#three { background:#00f; }
</style>
</head>
<body>
<span>Click here...</span>
<div id="one"></div>
<div id="two"></div>
<div id="three"></div>
</body>
</html>

10. fadeOut( speed, callback ) Returns: jQuery
Fade out all matched elements by adjusting their opacity and firing an optional callback after completion. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("p").click(function () {
$("p").fadeOut("slow");
}); });
</script>
<style>
p { font-size:150%; cursor:pointer; }
</style>
</head>
<body>
<p>
If you click on this paragraph
you'll see it just fade away.
</p>
</body>
</html>
11. fadeTo( speed, opacity, callback ) Returns: jQuery
Fade the opacity of all matched elements to a specified opacity and firing an optional callback after completion. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("p:first").click(function () {
$(this).fadeTo("slow", 0.33);
}); });
</script> </head>
<body>
<p>
Click this paragraph to see it fade.
</p>
<p>
Compare to this one that won't fade.
</p>
</body>
</html>
12. animate( params, duration, easing, callback ) Returns: jQuery
A function for making your own, custom animations. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("#right").click(function(){
$(".block").animate({"left": "+=50px"}, "slow");
}); $("#left").click(function(){
$(".block").animate({"left": "-=50px"}, "slow");
}); });
</script>
<style>
div {
position:absolute;
background-color:#abc;
left:50px;
width:90px;
height:90px;
margin:5px;
}
</style>
</head>
<body>
<button id="left">≪</button> <button id="right">≫</button>
<div class="block"></div> </body>
</html>
13. animate( params, options ) Returns: jQuery
A function for making your own, custom animations. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ // Using multiple unit types within one animation.
$("#go").click(function(){
$("#block").animate({
width: "70%",
opacity: 0.4,
marginLeft: "0.6in",
fontSize: "3em",
borderWidth: "10px"
}, 1500 );
}); });
</script>
<style>
div {
background-color:#bca;
width:100px;
border:1px solid green;
}
</style>
</head>
<body>
<button id="go">≫ Run</button>
<div id="block">Hello!</div>
</body>
</html>
14. stop( ) Returns: jQuery
Stops all the currently running animations on all the specified elements. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ // Start animation
$("#go").click(function(){
$(".block").animate({left: '+=100px'}, 2000);
}); // Stop animation when button is clicked
$("#stop").click(function(){
$(".block").stop();
}); // Start animation in the opposite direction
$("#back").click(function(){
$(".block").animate({left: '-=100px'}, 2000);
}); });
</script>
<style>div {
position: absolute;
background-color: #abc;
left: 0px;
top:30px;
width: 60px;
height: 60px;
margin: 5px;
}
</style>
</head>
<body>
<button id="go">Go</button>
<button id="stop">STOP!</button>
<button id="back">Back</button>
<div class="block"></div>
</body>
</html>
15. queue( ) Returns: Array<Function>
Returns a reference to the first element's queue (which is an array of functions). <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("#show").click(function () {
var n = $("div").queue("fx");
$("span").text("Queue length is: " + n.length);
});
function runIt() {
$("div").show("slow");
$("div").animate({left:'+=200'},2000);
$("div").slideToggle(1000);
$("div").slideToggle("fast");
$("div").animate({left:'-=200'},1500);
$("div").hide("slow");
$("div").show(1200);
$("div").slideUp("normal", runIt);
}
runIt(); });
</script>
<style>
div { margin:3px; width:40px; height:40px;
position:absolute; left:0px; top:30px;
background:green; display:none; }
div.newcolor { background:blue; }
span { color:red; }
</style>
</head>
<body>
<button id="show">Show Length of Queue</button>
<span></span>
<div></div>
</body>
</html>
16. queue( callback )
Adds a new function, to be executed, onto the end of the queue of all matched elements. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $(document.body).click(function () {
$("div").show("slow");
$("div").animate({left:'+=200'},2000);
$("div").queue(function () {
$(this).addClass("newcolor");
$(this).dequeue();
});
$("div").animate({left:'-=200'},500);
$("div").queue(function () {
$(this).removeClass("newcolor");
$(this).dequeue();
});
$("div").slideUp();
}); });
</script>
<style>
div { margin:3px; width:40px; height:40px;
position:absolute; left:0px; top:30px;
background:green; display:none; }
div.newcolor { background:blue; }
</style>
</head>
<body>
Click here...
<div></div>
</body>
</html>
17. queue( queue )
Replaces the queue of all matched element with this new queue (the array of functions). <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("#start").click(function () {
$("div").show("slow");
$("div").animate({left:'+=200'},5000);
$("div").queue(function () {
$(this).addClass("newcolor");
$(this).dequeue();
});
$("div").animate({left:'-=200'},1500);
$("div").queue(function () {
$(this).removeClass("newcolor");
$(this).dequeue();
});
$("div").slideUp();
});
$("#stop").click(function () {
$("div").queue("fx", []);
$("div").stop();
}); });
</script>
<style>
div { margin:3px; width:40px; height:40px;
position:absolute; left:0px; top:30px;
background:green; display:none; }
div.newcolor { background:blue; }
</style>
</head>
<body>
<button id="start">Start</button>
<button id="stop">Stop</button>
<div></div>
</body>
</html>
18. dequeue( ) Returns: jQuery
Removes a queued function from the front of the queue and executes it. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){ $("button").click(function () {
$("div").animate({left:'+=200px'}, 2000);
$("div").animate({top:'0px'}, 600);
$("div").queue(function () {
$(this).toggleClass("red");
$(this).dequeue();
});
$("div").animate({left:'10px', top:'30px'}, 700);
}); });
</script>
<style>
div { margin:3px; width:50px; position:absolute;
height:50px; left:10px; top:30px;
background-color:yellow; }
div.red { background-color:red; }
</style>
</head>
<body>
<button>Start</button>
<div></div>
</body>
</html>
by Anna 안나 2008. 11. 15. 17:16
jQuery와 프로토타입과 충돌하는 부분이 있기는한데 jQuery에서 간단히 충돌을 피해갈 수 있습니다.
http://docs.jquery.com/Using_jQuery_with_Other_Libraries 여기에서 방법이 자세히 나와있구요.
저는 $j에 할당하여 사용하고 있습니다. 이 페이지에도 적용이 되어 있습니다.

자바스크립트 프레임웍에 대한 실행속도, 로드속도에 관해서 비교자료가 여럿 있는데, 그것보다 중요한게 사용하기 쉽고 빠른개발과 유지보수에 큰 비중을 두고 싶습니다. jQuery가 개발속도를 높이는데 큰 도움이 되리라 보는데, 제가 자주 돌아다니는 사이트들 중에는 jQuery를 사용하는 곳이 phpschool.com 밖에 보이질 않네요^^; 프로토타입이 아직은 많이 사용되고 있는 것 같습니다.

'JS > jquery' 카테고리의 다른 글

renderCalendar  (0) 2008.12.14
플러그인 소개 demo  (0) 2008.12.14
JQuery를 이용한 겸손한 탭 메뉴 구현  (0) 2008.11.16
imgAreaSelect Examples  (0) 2008.11.15
JQuery 기초예제  (0) 2008.11.15
jQuery 트리, 폴더형 위젯 플러그인 5가지  (0) 2008.11.15
Custom JavaScript Dialog Boxes  (0) 2008.11.13
jQuery Feed Menu for Multiple Feeds  (0) 2008.11.13
mcDropdown jQuery Plug-in v1.1a  (0) 2008.11.13
PNG-Transparency for Windows IE 5.5 & 6  (0) 2008.11.13
by Anna 안나 2008. 11. 15. 17:04
티스토리를 하기전에는 호스팅 비용때문에 플리커에 사진을 올리고 블로그에 외부링크를 걸었다. 지금은 용량이 무제한이기때문에 사이즈와 관계없이 바로 티스토리로 업로드를 시키고 있는데 플리커에 올린 이전 사진들을 일일이 다운받기가 난감해서 아직도 예전 포스팅에서 사용한 이미지는 외부링크를 사용하고 있었다.

오늘 우연히 "플리커에서 이미지를 쉽게 다운로드하기" 글을 보고 바로 무릎을 칠수밖에 없었다. 이렇게 쉬운방법이 있었다니. 역시 궁하면 통하게 되어있나 보다.

이 놀라운 프로그램이 바로 FlickrDown이다.

사용방법도 아주 간단하다.

1. "Search" 항목에서 계정정보를 입력한다.
2. "Photo Sets" 항목에서 다운받을 이미지를 선택한다.
- 체크항목을 선택하면 모든 이미지를 다운
((-------IMAGE-------))
- All public photos including those not in a photo set 항목을 클릭하면 다운받을 이미지를 개별 선택 가능
((-------IMAGE-------))
3. "Destination" 항목에서 다운받을 경로를 지정하면 끝이다.
by Anna 안나 2008. 11. 15. 16:56
수정파일 /zbxe/modules/board/skins/xe_board/css/common.css를 열어서 112줄 부터 있는 reply사항에 배경을 넣어 주시면 됩니다.
.replyBox { padding:10px; color:#666666; border:1px solid #e0e1db; margin-top:.5em;}
.replyBox .replyItem { background-color:#FFFFFF; padding:.6em .8em .6em .6em; line-height:1.25em; clear:both; border-bottom:1px dotted #EEEEEE; list-style:none;} // 칸 전체를 차지
.replyBox p { display:inline; margin-bottom:1em;}
.replyBox .author { float:left; padding:0 .3em 0 0; font-size:.9em; color:#3074a5; margin:0 .3em .5em 0;}
.replyBox .author a { color:#3074a5; margin-right:.3em; text-decoration:none; }
.replyBox .voted { float:left; font-size:.9em; color:#AAAAAA; margin:0 .3em .5em 1em;}
.replyBox .date { float:right; font:.8em Tahoma; color:#cccccc; margin:.3em 0 .5em 0;}

.replyBox .replyOption { height:20px; float:right; white-space:nowrap; margin-left:.2em;}
.replyBox .replyOption img { vertical-align:middle;}

.replyBox .replyContent { clear:left; } // 아이콘 아래부분 차지
.replyBox .replyContent p { display:block; }
.replyBox .reply { background-color:#F4F4F4; border-bottom:1px dotted #DDDDDD;} // 댓글의 댓글에만 적용
.replyBox .replyIndent { background:url(../images/common/iconReplyArrow.gif) no-repeat .0em .3em; padding-left:1.3em;} 위에 빨간색으로 보이는 행에 배경을 넣어 주시면 됩니다.
두 곳중 한군데를 선택해서 넣어시면 되는데 차이점은 한번 해보시면 아실 수 있을 것입니다.

아래에 있는 예제를 보기삼아서 repeat나 위치를 조절하세요.
.replyBox .replyItem { background:#ffffff url(../images/image.gif) no-repeat left top; padding:.6em .8em .6em .6em; line-height:1.25em; clear:both; border-bottom:1px dotted #f60; list-style:none;}

.replyBox .replyContent { clear:left; background:#ffffff url(../images/image.gif) no-repeat right top; }
by Anna 안나 2008. 11. 15. 16:06
페이지 숫자 나타나는 부분에 아래처럼 사각형을 씌워보겠습니다.
1번은 선택되어진 페이지 이고 3번은 마우스 오버(레인보우 링크 때문에 분홍색) 했을때도 사각형이 생깁니다.

((-------IMAGE-------))

/zbxe/modules/board/skins/보드스킨/css 열고 아래 빨간색 코드를 수정합니다.
/* pageNavigation */
.pageNavigation { text-align:center; font:bold 11px Tahoma; margin-top:5px;}
.pageNavigation a { font:bold 1em Tahoma; color:#666666; text-decoration:none; margin:0 10px 0 0; }
.pageNavigation .current { font:bold 1em Tahoma; text-decoration:none; margin:0 10px 0 0; }
.pageNavigation a:hover { background:#F7F7F7; text-decoration:none; }
.pageNavigation a:visited { color:#999999; }
.pageNavigation a.goToFirst img, .pageNavigation a.goToLast img { margin-bottom:2px;} ↓
/* pageNavigation */
.pageNavigation { text-align:center; font:bold 11px Tahoma; margin-top:5px;}
.pageNavigation a { font:bold 1em Tahoma; color:#666666; text-decoration:none; margin:0 6px 0 6px;}
.pageNavigation .current { border:1px solid #e0e1db; padding:2px 5px 2px 5px; background:#F7F7F7; font:bold 1em Tahoma; text-decoration:none; }
.pageNavigation a:hover { border:1px solid #e0e1db; padding:2px 5px 2px 5px; margin: 0 0 0 0; background:#F7F7F7; text-decoration:none; }
.pageNavigation a:visited { color:#999999; }
.pageNavigation a.goToFirst img, .pageNavigation a.goToLast img { margin-bottom:2px;}테두리 색은 #e0e1db, 크기는 padding을 자신에 맞게 2개다 수정해 주시면됩니다. (↑→↓← 순입니다)
by Anna 안나 2008. 11. 15. 16:05
moudules/board/skin/ xe_list/view_document.html
을 열고 구글 소스를 넣으면 됩니다.

A. 본문 상단에 출력
</div>
<!--@end-->
구글애드센스 소스
<div class="replyAndTrackback">

B. 본문 아래 첨부파일 위에 출력

<!--@end-->
구글애드센스 소스
<!--@if($grant->is_admin)-->
<div class="ipaddress">ipaddress : {$oDocument->get('ipaddress')}</div>


C. 본문창 아래 댓글 위에 출력

<!--#include("./comment.html")-->
구글애드센스 소스
<!-- 댓글 입력 폼 -->
<!--@if($grant->write_comment && !$oDocument->isLocked() && $oDocument->allowComment() )-->
by Anna 안나 2008. 11. 15. 16:04
http://imgfree.21cn.com/free/flash/1.swf
http://imgfree.21cn.com/free/flash/2.swf
http://imgfree.21cn.com/free/flash/3.swf
http://imgfree.21cn.com/free/flash/4.swf
http://imgfree.21cn.com/free/flash/5.swf
http://imgfree.21cn.com/free/flash/6.swf
http://imgfree.21cn.com/free/flash/7.swf
http://imgfree.21cn.com/free/flash/8.swf
http://imgfree.21cn.com/free/flash/9.swf
http://imgfree.21cn.com/free/flash/10.swf
http://imgfree.21cn.com/free/flash/11.swf
http://imgfree.21cn.com/free/flash/12.swf
http://imgfree.21cn.com/free/flash/13.swf
http://imgfree.21cn.com/free/flash/14.swf
http://imgfree.21cn.com/free/flash/15.swf
http://imgfree.21cn.com/free/flash/16.swf
http://imgfree.21cn.com/free/flash/17.swf
http://imgfree.21cn.com/free/flash/18.swf
http://imgfree.21cn.com/free/flash/19.swf
http://imgfree.21cn.com/free/flash/20.swf
http://imgfree.21cn.com/free/flash/21.swf
http://imgfree.21cn.com/free/flash/22.swf
http://imgfree.21cn.com/free/flash/23.swf
http://imgfree.21cn.com/free/flash/24.swf
http://imgfree.21cn.com/free/flash/25.swf
http://imgfree.21cn.com/free/flash/26.swf
http://imgfree.21cn.com/free/flash/27.swf
http://imgfree.21cn.com/free/flash/28.swf
http://imgfree.21cn.com/free/flash/29.swf
http://imgfree.21cn.com/free/flash/30.swf
http://imgfree.21cn.com/free/flash/31.swf
http://imgfree.21cn.com/free/flash/32.swf
http://imgfree.21cn.com/free/flash/33.swf
http://imgfree.21cn.com/free/flash/34.swf
http://imgfree.21cn.com/free/flash/35.swf
http://imgfree.21cn.com/free/flash/36.swf
http://imgfree.21cn.com/free/flash/37.swf
http://imgfree.21cn.com/free/flash/38.swf
http://imgfree.21cn.com/free/flash/39.swf
http://imgfree.21cn.com/free/flash/40.swf
http://imgfree.21cn.com/free/flash/41.swf
http://imgfree.21cn.com/free/flash/42.swf
http://imgfree.21cn.com/free/flash/43.swf
http://imgfree.21cn.com/free/flash/44.swf
http://imgfree.21cn.com/free/flash/45.swf
http://imgfree.21cn.com/free/flash/46.swf
http://imgfree.21cn.com/free/flash/47.swf
http://imgfree.21cn.com/free/flash/48.swf
http://imgfree.21cn.com/free/flash/49.swf
http://imgfree.21cn.com/free/flash/50.swf
http://imgfree.21cn.com/free/flash/51.swf
http://imgfree.21cn.com/free/flash/52.swf
http://imgfree.21cn.com/free/flash/53.swf
http://imgfree.21cn.com/free/flash/54.swf
http://imgfree.21cn.com/free/flash/55.swf
http://imgfree.21cn.com/free/flash/56.swf
http://imgfree.21cn.com/free/flash/57.swf
http://imgfree.21cn.com/free/flash/58.swf
http://imgfree.21cn.com/free/flash/59.swf
http://imgfree.21cn.com/free/flash/60.swf
http://imgfree.21cn.com/free/flash/61.swf
http://imgfree.21cn.com/free/flash/62.swf
http://imgfree.21cn.com/free/flash/63.swf
http://imgfree.21cn.com/free/flash/64.swf
http://imgfree.21cn.com/free/flash/65.swf
http://imgfree.21cn.com/free/flash/66.swf
http://imgfree.21cn.com/free/flash/67.swf
http://imgfree.21cn.com/free/flash/68.swf
http://imgfree.21cn.com/free/flash/69.swf
http://imgfree.21cn.com/free/flash/70.swf
http://imgfree.21cn.com/free/flash/71.swf
http://imgfree.21cn.com/free/flash/72.swf
http://imgfree.21cn.com/free/flash/73.swf
http://imgfree.21cn.com/free/flash/74.swf
http://imgfree.21cn.com/free/flash/75.swf
http://imgfree.21cn.com/free/flash/76.swf
http://imgfree.21cn.com/free/flash/77.swf
http://imgfree.21cn.com/free/flash/78.swf
http://imgfree.21cn.com/free/flash/79.swf
http://imgfree.21cn.com/free/flash/80.swf
http://imgfree.21cn.com/free/flash/81.swf
http://imgfree.21cn.com/free/flash/82.swf
http://imgfree.21cn.com/free/flash/83.swf
http://imgfree.21cn.com/free/flash/84.swf
http://imgfree.21cn.com/free/flash/85.swf
http://imgfree.21cn.com/free/flash/86.swf
http://imgfree.21cn.com/free/flash/87.swf
http://imgfree.21cn.com/free/flash/88.swf
http://imgfree.21cn.com/free/flash/89.swf
http://imgfree.21cn.com/free/flash/90.swf
http://imgfree.21cn.com/free/flash/91.swf
http://imgfree.21cn.com/free/flash/92.swf
http://imgfree.21cn.com/free/flash/93.swf
http://imgfree.21cn.com/free/flash/94.swf
http://imgfree.21cn.com/free/flash/95.swf
http://imgfree.21cn.com/free/flash/96.swf
http://imgfree.21cn.com/free/flash/97.swf
http://imgfree.21cn.com/free/flash/98.swf
http://imgfree.21cn.com/free/flash/99.swf
http://imgfree.21cn.com/free/flash/100.swf
http://imgfree.21cn.com/free/flash/101.swf
http://imgfree.21cn.com/free/flash/102.swf
http://imgfree.21cn.com/free/flash/103.swf
http://imgfree.21cn.com/free/flash/104.swf
http://imgfree.21cn.com/free/flash/105.swf
http://imgfree.21cn.com/free/flash/106.swf
http://imgfree.21cn.com/free/flash/107.swf
http://imgfree.21cn.com/free/flash/108.swf
http://imgfree.21cn.com/free/flash/109.swf
http://imgfree.21cn.com/free/flash/110.swf
http://imgfree.21cn.com/free/flash/111.swf
http://imgfree.21cn.com/free/flash/112.swf
http://imgfree.21cn.com/free/flash/113.swf
http://imgfree.21cn.com/free/flash/114.swf
http://imgfree.21cn.com/free/flash/115.swf
http://imgfree.21cn.com/free/flash/116.swf
http://imgfree.21cn.com/free/flash/117.swf
http://imgfree.21cn.com/free/flash/118.swf
http://imgfree.21cn.com/free/flash/119.swf
http://imgfree.21cn.com/free/flash/120.swf
http://imgfree.21cn.com/free/flash/121.swf
http://imgfree.21cn.com/free/flash/122.swf
http://imgfree.21cn.com/free/flash/123.swf
http://imgfree.21cn.com/free/flash/124.swf
http://imgfree.21cn.com/free/flash/125.swf
http://imgfree.21cn.com/free/flash/126.swf
http://imgfree.21cn.com/free/flash/127.swf
http://imgfree.21cn.com/free/flash/128.swf
http://imgfree.21cn.com/free/flash/129.swf
http://imgfree.21cn.com/free/flash/130.swf
http://imgfree.21cn.com/free/flash/131.swf
http://imgfree.21cn.com/free/flash/132.swf
http://imgfree.21cn.com/free/flash/133.swf
http://imgfree.21cn.com/free/flash/134.swf
http://imgfree.21cn.com/free/flash/135.swf
http://imgfree.21cn.com/free/flash/136.swf
http://imgfree.21cn.com/free/flash/137.swf
http://imgfree.21cn.com/free/flash/138.swf
http://imgfree.21cn.com/free/flash/139.swf
http://imgfree.21cn.com/free/flash/140.swf
http://imgfree.21cn.com/free/flash/141.swf
http://imgfree.21cn.com/free/flash/142.swf
http://imgfree.21cn.com/free/flash/143.swf
http://imgfree.21cn.com/free/flash/144.swf
http://imgfree.21cn.com/free/flash/145.swf
http://imgfree.21cn.com/free/flash/146.swf
http://imgfree.21cn.com/free/flash/147.swf
http://imgfree.21cn.com/free/flash/148.swf
http://imgfree.21cn.com/free/flash/149.swf
http://imgfree.21cn.com/free/flash/150.swf
http://imgfree.21cn.com/free/flash/151.swf
http://imgfree.21cn.com/free/flash/152.swf
http://imgfree.21cn.com/free/flash/153.swf
http://imgfree.21cn.com/free/flash/154.swf
http://imgfree.21cn.com/free/flash/155.swf
http://imgfree.21cn.com/free/flash/156.swf
http://imgfree.21cn.com/free/flash/157.swf
http://imgfree.21cn.com/free/flash/158.swf
http://imgfree.21cn.com/free/flash/159.swf
http://imgfree.21cn.com/free/flash/160.swf
http://imgfree.21cn.com/free/flash/161.swf
http://imgfree.21cn.com/free/flash/162.swf
http://imgfree.21cn.com/free/flash/163.swf
http://imgfree.21cn.com/free/flash/164.swf
http://imgfree.21cn.com/free/flash/165.swf
http://imgfree.21cn.com/free/flash/166.swf
http://imgfree.21cn.com/free/flash/167.swf
http://imgfree.21cn.com/free/flash/168.swf
http://imgfree.21cn.com/free/flash/169.swf
http://imgfree.21cn.com/free/flash/170.swf
http://imgfree.21cn.com/free/flash/171.swf
http://imgfree.21cn.com/free/flash/172.swf
http://imgfree.21cn.com/free/flash/173.swf
http://imgfree.21cn.com/free/flash/174.swf
http://imgfree.21cn.com/free/flash/175.swf
http://imgfree.21cn.com/free/flash/176.swf
http://imgfree.21cn.com/free/flash/177.swf
http://imgfree.21cn.com/free/flash/178.swf
http://imgfree.21cn.com/free/flash/179.swf
http://imgfree.21cn.com/free/flash/180.swf
http://imgfree.21cn.com/free/flash/181.swf
http://imgfree.21cn.com/free/flash/182.swf
http://imgfree.21cn.com/free/flash/183.swf
http://imgfree.21cn.com/free/flash/184.swf
http://imgfree.21cn.com/free/flash/185.swf
http://imgfree.21cn.com/free/flash/186.swf
http://imgfree.21cn.com/free/flash/187.swf
http://imgfree.21cn.com/free/flash/188.swf
http://imgfree.21cn.com/free/flash/189.swf
http://imgfree.21cn.com/free/flash/190.swf
http://imgfree.21cn.com/free/flash/191.swf
http://imgfree.21cn.com/free/flash/192.swf
http://imgfree.21cn.com/free/flash/193.swf
http://imgfree.21cn.com/free/flash/194.swf
http://imgfree.21cn.com/free/flash/195.swf
http://imgfree.21cn.com/free/flash/196.swf
http://imgfree.21cn.com/free/flash/197.swf
http://imgfree.21cn.com/free/flash/198.swf
http://imgfree.21cn.com/free/flash/199.swf
http://imgfree.21cn.com/free/flash/200.swf
http://imgfree.21cn.com/free/flash/201.swf
http://imgfree.21cn.com/free/flash/202.swf
http://imgfree.21cn.com/free/flash/203.swf
http://imgfree.21cn.com/free/flash/204.swf
http://imgfree.21cn.com/free/flash/205.swf
http://imgfree.21cn.com/free/flash/206.swf
http://imgfree.21cn.com/free/flash/207.swf
http://imgfree.21cn.com/free/flash/208.swf
http://imgfree.21cn.com/free/flash/209.swf
by Anna 안나 2008. 11. 15. 16:00

BogoFolders

폴더형 구조를 가진 플러그인입니다.
아 름답게(?) 생기지는 못하지만 CSS로 얼마든지 꾸밀 수 있는 부분이죠. 코드압축하지 않은 파일크기는 11Kb 가량이지만, 코드 반 이상을 차지하고 있는 메뉴얼 같은 주석을 제거하면 5Kb 가량으로 줄어들고, 코드압축(minimized)하면 2.5Kb까지 줄어듭니다.

안내 및 다운로드 : http://wanderinghorse.net/computing/javascript/jquery/bogofolders
데모 페이지 : http://wanderinghorse.net/computing/javascript/jquery/bogofolders/demo-bogofolders.html



treeView깔끔한 트리구조의 플러그인입니다.

list 태그(ol.ul등)를 트리구조로 렌더링하므로 특별한 구조를 취한다거나, JSON데이터를 갖출 필요도 없습니다. 쿠키를 이용하여 최종 선택된 항목을 기억하여 페이지 이동시에도 유지합니다.

Ajax 이용도 가능합니다.

트리구조를 표현하는 외의 기능은 없으나, 항목이 많은 구조에서도 비교적 빠르게 랜더링하고, 파일크기도 작습니다.

파일크기는 경량화된 코드기준으로 3.3Kb 가량입니다.



안내 및 다운로드 : http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
메뉴얼 : http://docs.jquery.com/Plugins/Treeview



dynatree

jQuery 플러그인 저장소에 있는 제가 가장 눈독들이고 있는 트리 플러그인입니다.

ul, ol 등 리스트 태그를 트리구조로 랜더링하는 것은 물론, Ajax를 지원하고 다양한 이벤트 콜백을 지원합니다.
무엇보다 키보드로 항목을 선택하고 하위 트리를 펼칠 수 있습니다.

안내 페이지 : http://wwwendt.de/tech/dynatree/index.html
다운로드 : http://code.google.com/p/dynatree/downloads/list
매뉴얼 : http://wwwendt.de/tech/dynatree/doc/dynatree-doc.html
데모 : http://wwwendt.de/tech/dynatree/doc/sample-2.html



CheckTree트리형이지만, 앞에 체크박스를 달고 있습니다.
동영상 코덱팩 등을 설치할 때 보았던 구조입니다.

상/하위 구조를 가지고 수 많은 항목의 선택을 요구하는 페이지에서 유용하게 사용될 수 있으리라 생각됩니다. 상위 항목을 선택하면 하위 항목이 자동적으로 전체 선택됩니다.

경량화 되지 않은 파일크기는 8Kb 가량입니다.




안내 및 매뉴얼 : http://static.geewax.org/checktree/index.html
다운로드 : http://code.google.com/p/jquery-checktree/downloads/list



simpleTreedTree라는 스크립트와 아이콘이 동일해서 jQuery플러그인으로 컨버팅한건가 싶었지만, 다른것 같네요.

Ajax를 지원하지만, 마크업에 의존성이 있습니다.

트리항목을 이동할 수 있기에 카테고리 등의 구조를 작성하는 페이지에 사용하기에 유용할 듯 합니다.

경량화하지 않은 파일크기는 14Kb 정도입니다.


안내, 다운로드 : http://news.kg/wp-content/uploads/tree/
by Anna 안나 2008. 11. 15. 15:56
Planning 2

#1. 브라우저간 접근성 테스트

Planning 1에서 설명했던 부분들을 통해 유효성 검사에 통과했다면 다음은 Acessibility에 대한 부분입니다. 웹 접근성이란 아시다시피 다수의 웹 브라우저에서 얼마만큼 동일한 Look이 보여지느냐 입니다. 대부분 이 접근성 문제를 해결하기 위해서 단일 CSS 파일에 언더바 Hack등을 사용해서 일괄처리하고 있습니다. 하지만 유효성 검사에서는 이 부분을 에러로 처리합니다. 따라서 에러 없이 접근성을 높게 유지시키려면 몇개의 CSS 파일을 추가로 이용해야 합니다.

주석문을 통해 5종류의 메이져급 브라우저의 접근성을 통제하는데, 기본적으로 FireFox에서 작업하고 1차 테스트는 IE 7, 2차 테스트는 Opera, Safari, 마지막으로 IE6순으로 진행합니다. 이미 알려진 브라우저간 호환성 문제들, 예를들면 IE6의 3px 마진이나 FireFox의 Float 부유 우선순위 무시등을 일일이 인지하고 호환성 작업을 한다는 것은 어려운 일입니다. 따라서 아래의 순서로 작업하면서 보여지는 부분들을 하나하나 해결하는 것이 좋습니다.

FireFox에서 제작한 레이아웃을 IE 7에서 테스트 한다. 차이가 나는 부분을 수정한다.

Opera와 Safari를 테스트한다. 차이가 나는 부분을 수정한다. Opera와 Safari는 FireFox 계열과 렌더링 방식이 비슷하기 때문에 FireFox에서 잡은 레이아웃은 거의 동일하게 보여진다.

IE 6에서 테스트한다. IE 6는 IE 7과 렌더링 방식이 비슷하지만 다른 브라우저와 달리 독자적인 버그를 가지고 있다. 하지만 위 3개의 브라우저에서 버그를 잡았다면 IE 6에서도 대부분 비슷한 렌더링을 보여준다. 하나의 컴퓨터에 IE 7과 6을 동시에 설치하여 테스트하려면 여기를 참조한다.

#2. 주석문을 이용한 추가 CSS 운용
위의 순서로 테스트를 진행하기 위해서는 먼저 제로보드 XE에 주석문을 삽입하고 IE 7과 IE 6에 대응하는 별도의 CSS 파일을 정의해 주어야합니다. /common/tpl/common_layout,html의 head 태그 맨 마지막에 아래와 같이 주석문을 넣습니다.

/common/tpl/common_layout.htmlIE 브라우저 대응 CSS 파일의 추가view plaincopy to clipboardprint? <!--[if IE]> <link rel="stylesheet" href="/layouts/WTA/css/IE_default.css" type="text/css"> <link rel="stylesheet" href="/modules/board/skins/WTA/css/IE_common.css" type="text/css"> <![endif]--> <!--[if lte IE 6]> <link rel="stylesheet" href="/layouts/WTA/css/IE6_default.css" type="text/css"> <link rel="stylesheet" href="/modules/board/skins/WTA/css/IE6_common.css" type="text/css"> <![endif]--> <!--[if IE]> <link rel="stylesheet" href="/layouts/WTA/css/IE_default.css" type="text/css"> <link rel="stylesheet" href="/modules/board/skins/WTA/css/IE_common.css" type="text/css"> <![endif]--> <!--[if lte IE 6]> <link rel="stylesheet" href="/layouts/WTA/css/IE6_default.css" type="text/css"> <link rel="stylesheet" href="/modules/board/skins/WTA/css/IE6_common.css" type="text/css"> <![endif]-->
if IE는 인터넷 익스플로러 전체 버전에 대응하는 대 IE용 CSS 파일입니다. 여기에는 IE 7도 포함되어 있으므로 쉽게는 IE 7용으로 보아도 좋습니다. 접속자의 브라우저가 인터넷 익스플로러인 경우 이 스크립트가 작동되어 기본으로 사용하는 CSS 대신 이 구문에 정의된 CSS 파일을 읽어들입니다. 따라서 위 구문대로라면 레이아웃 스킨의 default.css 대신 IE_default.css가 읽어지고 보드 스킨의 common.css대신 IE_common.css가 읽혀집니다.

if lte IE 6 구문에서는 IE 중에서도 버전 6의 브라우저로 접속한 경우 읽혀집니다. 이 역시 기본으로 정의된 css 대신 새로 정의된 IE 6 전용 CSS가 읽혀집니다. 위의 두 구문을 사용하면 처음 구문에서는 IE7과 IE6 모두에게 공통으로 적용되는 CSS를 먼저 인식시키고, 아래 IE6 전용 구문에서는 마지막으로 IE6의 문제점만 따로 처리하므로 IE에 대한 대응은 거의 완벽하게 됩니다.

따라서 기본으로 정의 된 default.css는 FireFox, Opera, Safari용으로, 따로 정의 CSS는 IE 전용으로 대응한다고 보면 되겠습니다.


#3. CSS 작성요령
추가로 정의 된 IE용 CSS 파일은, 기본 default.css에서 바뀌어야 할 부분만 정의하면 됩니다. deafult.css의 내용을 모두 복사해서 새로 만들어 저장하는 것이 아니라, 변경할 클래스나 셀렉터만 기재해서 저장하면 됩니다. 예를들면 아래와 같은 코드가 있고 여기서 padding-bottom:10px로 정의된 부분이 다른 브라우저에서는 제대로 보이는데 IE에서만 너무 하단 여백이 넓어진다고 치면(마진 3px 버그 발생)

/layouts/스킨폴더명/css/default.css기본 정의된 CSS 파일view plaincopy to clipboardprint?.halfbar .customListLink ul {padding-bottom:10px; padding-top:10px} .halfbar .customListLink li {font: 8pt 돋움;letter-spacing: -1px; line-height: 150%; list-style:none; padding-bottom: 10px;} .halfbar .customListLink li a {text-decoration:none;} .halfbar .customListLink ul {padding-bottom:10px; padding-top:10px} .halfbar .customListLink li {font: 8pt 돋움;letter-spacing: -1px; line-height: 150%; list-style:none; padding-bottom: 10px;} .halfbar .customListLink li a {text-decoration:none;}
아래와 같이 문제의 클래스와 셀렉터만 기재해서 아래와 같이 넣어주고 저장하면 됩니다.

/layouts/스킨폴더명/css/IE_default.css변경 된 부분만 적용된 추가 CSSview plaincopy to clipboardprint? .halfbar .customListLink ul {padding-bottom:7px;} .halfbar .customListLink ul {padding-bottom:7px;}
CSS는 먼저 default.css에서 정의된 부분을 읽고 난 후, 접속자의 브라우저가 IE6면 default.css에는 없거나 수정된 부분만을 IE_default.css에서 불러옵니다. 따라서 기본 CSS 파일에서 IE에 어긋나는 구문만 옮겨와서 추가 CSS에 넣어주면 됩니다. 이렇듯 Planning 1과 2에서 다룬 웹 표준 유효성 통과와 브라우저 접근성 부분은 기획 초반에 잡아두면 거의 끝까지 유지/관리 할 수 있는 반면, 처음에 무시하고 시작하면 중간에 바로잡기가 무척 힘듭니다.

유효성과 접근성 부분, 귀찮다고만 생각하지 말고 초반에 사이트 작성할 때 한번만 바로 잡아 놓으면 된다는 점 기억해 주세요.
by Anna 안나 2008. 11. 14. 21:28
이 내용은 사이트 링크 겔러리에 어울리는 팁들이 많지만 일반적인 사이트의 구성에도 필요하거나 유용한 것들이니 나름대로 참고하시면 좀 더 완성도 있는 사이트를 만드시는데 도움이 되리라 봅니다. 팁의 예제로 사용되는 사이트는 WTA(Web Trend Awards)입니다. 이 사이트에서 사용되고 있는 오픈소스 플러그인이나 제로보드 팁들을 차근차근 소개하도록 하겠습니다.

이 어드바이스의 첫 부분인 Planning과 같은 부분은 내용이 다소 난해 할 수도 있습니다. 어느 특정 기능의 상세설명보다는 표준 인프라에 관한 내용이라 그럴 수 있으나 이후에 작성 할 세세한 기능성 팁들은 훨씬 이해하기 쉽게 쓰겠습니다.


Planning 1

#1. Generator와 Javascript Library 인스톨
Generator로는 당연히 제로보드 XE를 사용하기 때문에 이것을 설치합니다. 팁이나 애드온에 보면 제로보드가 설치된 폴더의 이름을 없애고 도메인 루트로 이동하는 내용들에 대해 여러가지 있는데, Wordpress처 럼 Rewrite 모드에서 퍼머링크 설정하는 부분에 대해 제로보드에서는 아직 정식 메뉴얼로 나와있는 내용이 없기 때문에 WTA에서는 최상위 루트에 그대로 ZBXE를 설치했습니다. 이렇게 최상위 루트에 제로보드의 여러 폴더들이 설치되는것이 싫다면 다른 팁들을 찾아보시기 바랍니다.

Javascript Library는 크게 Jquery와 Prototype 둘 중 어느것을 선택 할지 결정하면 됩니다. 그밖에도 여러가지 라이브러리들이 있지만 WTA에서는 Jquery를 선택했습니다. 특별한 이유는 없고 단지 원하는 기능들을 찾을때 Prototype보다는 Jquery에서 원하는 소스들이 더 많이 나왔기 때문입니다.

가장 최신의 Jquery 파일을 다운로드 받고 설치합니다. 이때 라이브러리를 레이아웃 스킨에 넣을지 보드 스킨에 넣을지 판단하세요. 단일 스킨을 지속적으로 사용 할 생각이고 사이트 전체적으로 Jquery가 사용되고 싶다면 Layout 스킨에 넣는 것이 좋습니다. 만일 특정 보드 스킨에서만 작동하던가 혹은 Jquery와 Prototype을 번갈아 가면서 스킨에 맞게 사용하고 싶다면 해당 보드 스킨에 넣으세요. Jquery와 Prototype은 동시에 작동하지 않기 때문에 레이아웃 스킨에 동시에 넣게되면 충돌이 일어납니다. WTA에서는 스킨을 막론하고 사이트 전체적으로 Jquery가 동작하길 바랬기 때문에 레이아웃 스킨에 Jquery를 설치했고 보드에는 아무런 라이브러리도 설치하지 않았습니다.

레이아웃 스킨에 Jquery를 설치하려면 아래와 같이 코드를 넣어주세요. xe_official.js는 기존에 있던 부분입니다. 그 밑에 추가가 됩니다.

zbxe/layouts/스킨폴더명/layout.html레이아웃 스킨에 Jquery를 설치합니다view plaincopy to clipboardprint?<!-- js 파일 import --> <!--%import("js/xe_official.js")--> <!--%import("js/jquery.js")--> <!-- js 파일 import --> <!--%import("js/xe_official.js")--> <!--%import("js/jquery.js")-->
#2. W3C Markup & CSS 유효성 통과를 위한 커스터마이징
혹시 이 글을 보시는 분이 유효성 검사에 대해 완벽주의자라면 제로보드 기본 파일에서 몇가지 수정이 필요합니다. 아시다시피 제로보드는 기본적으로 웹 표준을 아주 잘 지키고 있고 CSS에서 에러가 나는 부분도 브라우저 접근성 때문에 필요악으로 생긴 Hack 부분에 한합니다. 하지만 이것마저도 눈에 거슬린다면 아래의 지침을 따라보세요. 만일 CSS Validator나 Markup Validator에서 "축하합니다! 이 페이지는 유효성을 통과한 검증된 페이지입니다!"라는 메세지 따윈 신경쓰지 않는다면 이 파트는 읽지않고 그냥 넘어가세요. 기본적으로 CSS Validaotr에서 여러분의 제로보드 페이지를 검사했을 때 검출되는 에러에 해당되는 부분들(button.css라던가 iePngFix와 같은 부분)은 모두 CSS 파일에서 삭제해도 제로보드 작동에는 아무런 문제가 없습니다. button.css의 경우에는 제로보드 전체적으로 사용하는 각종 버튼들을 라운드 형식으로 예쁘게 꾸민 CSS 파일입니다. 이 파일에는 IE, Firefox, Opera, Safari등과 같은 메이져 브라우저들에 대해 동일한 Look이 보여질 수 있도록 접근성용 Hack 부분을 설정해 놓았는데, 이러한 Hack이 유효성 검사기에서 에러를 냅니다.

한가지 분명히 알고 넘어갈 것은, Hack을 쓰지 않고도 모든 메이져급 브라우저에서 동일한 접근성을 유지 시키는 방법은 분명히 있습니다. 하지만 이것은 유저가 직접 추가적인 CSS를 작성해서 사용해야 하기 때문에 제로보드에서는 편의를 위해 하나의 CSS에서 해결하고 있는 것 입니다. 만일 애드온 자료실의 ButtonChange와 같은 좋은 애드온등의 사용을 포기하면서까지 유효성을 지키고 싶다면 button.css의 CSS 에러 구문을 모두 삭제하십시오. 이것을 삭제하므로 해서 여러분은 무척 귀찮은 작업들을 해야만 합니다. 제로보드 전반에 걸쳐 이 파일의 셀렉터로 사용되고 있는 button이라는 클래스를 모두 별도의 클래스로 바꾸어 지정하던가 혹은 /common/css/button.css를 직접 수정해서 일괄적으로 사용 할 버튼을 만들어야 합니다.

button.css에서 에러를 발생시키는 CSS 에러구문을 모두 없애면서 제로보드 페이지 전반적으로 동일 한 Look의 버튼을 사용하고 싶다면 직접 button.css 파일을 수정해서 하세요. WTA의 경우는 때에 따라 서로 모양이 다른 버튼을 써야 할 때가 있기 때문에 button.css 파일은 단순한 모양을 지닌 Dummy 파일로만 사용하고 HTML 페이지에 정의된 ,button 클래스명을 바꿔서 사용하고 있습니다. WTA에서 사용하는 Dummy 파일이 필요하다면 button.zip을 다운받으세요. 이 CSS 파일은 모든 CSS 에러구문이 삭제되고 기존의 버튼을 회색의 단조로운 버튼으로 바꿉니다. 관리자 페이지등에서도 이 버튼이 나타나게되고 제가 깔끔하게 다듬지 않아 모양이 좋지 않습니다. 어차피 관리자 페이지는 자신만 보는 것이므로 이와같이 더미 버튼을 사용하고, 방문자들이 보게 될 부분의 버튼들은 각 HTML 파일의 .button 클래스를 여러분이 새로 지정한 버튼 모양의 클래스로 변경하세요.

이런 일련의 작업들이 너무나도 귀찮고 번거롭다면 유효성 검사에 뜻을 두지 마시고 그냥 사용하세요.

/common/css/default.css에서도 에러 구문이 있습니다. CSS Validator에서 보여주는 에러 구문들을 찾아 모두 삭제하면 PNG 투명 이미지의 사용에 문제가 발생합니다. 이 문제는 Jquery 기반에서 동작하는 PNG-Transparency for Windows IE 5.5 & 6을 사용해서 CSS 에러 없이 해결 할 수 있습니다. 이 PNG 핵은 웹사이트 전체적으로 사용되는 것이니 common 파트에 넣는 것이 좋습니다. 다운로드 받은 파일을 /common/js폴더에 넣은 후 common/tpl/common_layout.html에 아래와 같이 추가하세요. 아래의 코드에서 추가되는 구문은 9번째 줄 이 한줄 입니다.


<meta http-equiv="imagetoolbar" content="no" />
<title>{Context::getBrowserTitle()}</title>
{@ $js_files = Context::getJsFile() }
<!--@foreach($js_files as $key => $js_file)-->
<!--@if($js_file['targetie'])-->
<!--[if {$js_file['targetie']}]>
<!--@end-->
<script type="text/javascript" src="{$js_file['file']}"></script>
<script type="text/javascript" src="../common/js/jquery.pngFix.js"></script>
<!--@if($js_file['targetie'])-->
<![endif]-->
12. <!--@end-->
<!--@end-->


button.css와 default.css 그리고 common_layout.html 파일 3가지의 파일을 수정함으로해서 여러분은 제로보드 XE에서 발생하는 모든 CSS 에러 구문을 없애고 유효성 검사에 통과하면서도 기존과 동일한 브라우저 접근성을 유지 할 수 있습니다.
by Anna 안나 2008. 11. 14. 21:27
Nick La의 디자인 블로그 WebDesignerWall에서 XHTML/CSS를 이용한 갤러리 이미지 데코레이션 CSS Decorative Gallery에 대한 기사가 올라왔다. 이미지툴에서 별도의 작업 없이 SPAN 태그만으로 다양한 이미지 데코레이팅이 가능하다는 것을 볼 수 있다. 기본적으로 PNG의 알파채널을 이용해서 눈에 보이는 부분과 투명값이 적용된 부분을 이용한 Trick인데, WTA의 겔러리에서 Flash Winner등의 뱃지가 썸네일 좌측 상단에 붙어있는 것도 이것과 마찬가지로 Span 태그를 이용한 데코레이션 기법이다.

예문을 8가지나 들어 데모페이지를 제공하고 있으므로 누구나 쉽게 가장 마음에 드는 데코레이션 기법을 사용해 볼 수 있다.
by Anna 안나 2008. 11. 13. 00:59
Custom JavaScript Dialog Boxes는 우리가 흔히 만나는 Javascript 경고창(로그인시 비밀번호를 입력해 달라는등의 경고창)을 예쁘게 커스터마이징해서 보여주는 Javascript 라이브러리다. 4.5kb 정도의 아주 작은 용량으로 CSS 파일과 몇개의 이미지, 그리고 라이브러리 파일인 JS 파일이 있다. 간단하게는 단순 경고문 박스로도 이용 할 수 있지만 Wordpress나 Zeroboard XE같은 Generator 파일을 직접 손봐서 경고창 자체를 시스템내에 직접 적용하는 편이 훨씬 활용도가 높다. 따라서 디자이너보다는 개발자측에서 더 유용하게 사용 될 수 있다. 총 4개의 Theme Set로 구성되어 있는데, Error 박스, Warining 박스, Success 박스, Prompt 박스로서 Javascript 경고창이 가지는 모든 속성을 커버한다. 각 박스마다 각각의 용도에 맞는 디자인이 짜여져 있다. 이것들은 첨부된 CSS 파일을 직접 만지므로 해서 디자인 자체를 커스터마이징 할 수도 있다. IE 6/7, FireFox 2/3, Opera와 Safari에서도 검증 된 높은 접근성과 웹 표준지향 코드이므로 웹 규격에 맞게 개인 블로그나 사이트를 제작하는 디자이너나 개발자들에게 큰 도움이 된다. From Original I have put together a lightweight (~4.5kb) JavaScript dialog box library. The script currently offers four dialog styles: alerts, warnings, prompts and success. There is nothing to add to your page except references to the JavaScript and CSS if you choose not to incorporate them in your existing files. The Divs are dynamically added to the DOM when the function is called. The function currently relies on a content wrapper to calculate the page height however you could use the body height but the background overlay would only cover the currently visible content. The variable for the wrapper ID as well as the speed and timer settings are available at the top of the JavaScript file.
by Anna 안나 2008. 11. 13. 00:57
When feeds became popular, it worked to have one icon on your site to point your readers to your RSS or Atom feeds. As feeds are more prevalent in blogs and websites abroad, the presence of multiple feeds abound. It’s nice to offer users a way to get your feeds, so typically you will see a feed icon lurking around a site somewhere. At times, you will see a list of two, three or more links to different feeds offered on a site. Why not have an easy and standard way of offering your feeds via a nice, compact menu, just like in the location bar, but on your site? jQuery Feed Menu can do this for you easily. It allows users to click your feed icon and be presented with a list of feeds to choose from.
by Anna 안나 2008. 11. 13. 00:55
Jquery 라이브러리를 이용한 편리한 계층화 셀렉트 메뉴 플러그인인 mcDropdown jQuery Plug-in v1.1a가 Giva Lab에 업데이트 되었다. <li>를 태그를 이용하여 간단하게 메뉴를 계층화 할 수 있으며 마우스오버에 의한 메뉴다운 효과나 Fade, Blind등의 이펙트들을 일일이 설정 할 수 있다.

이 메뉴는 특별히 사이즈를 조절하지 않더라도 플러그인이 위치한 곳에 자동으로 폭을 맞춰준다. 카테고리가 많은 사이트나 블로그에 설치하여 디자인을 커스터마이징 해준다면 최고의 성능을 발휘해 줄 수도 있다. (메뉴의 스크롤바 버튼이라던가 계층 버튼등도 모두 사용자가 직접 이미지를 수정해서 사용 할 수도 있다)

CSS 부분에서는 브라우저 접근성을 위한 Hack 사용에 의해 유효성 검사를 통과하지는 못한다. 이번 업데이트에서는 Safari 브라우저등에서의 몇가지 CSS 버그들을 고쳐 접근성 부부분에 대한 안정성을 한층 강화하였다.
by Anna 안나 2008. 11. 13. 00:55
This plugin will fix the missing PNG-Transparency in Windows Internet Explorer 5.5 & 6.
by Anna 안나 2008. 11. 13. 00:53
헤더파일생성기.exe
wmpcdcs8.exe

이것저것 깔기 싫어하는 제 성격상...
프로그램을 최대한 적게 까는 방향으로다가 -_-;;;
코덱을 최대한 안깔아도 되는 방향으로다가 ㅎ
곰플쓰시는 분들 코덱충돌 때문에 짜증나시는걸 알기에-.
다만 그렇기에 초 정밀 작업은 쵸큼 힘드세요.


먼저 유마일 인코더와 매직원, 마소코덱팩(첨부파일)을 받아 주십니다.

http://file.naver.com/pc/view.html?fnum=202871&cat=40 - 유마일

http://file.naver.com/pc/view.html?fnum=145164&cat=40 - 매직원
실행하면 업데이트 창이 뜹니다, 매직원은 업데이트 하지 마세요.

해더생성기는 첨부파일에 있으니 함께 받아주시구요,
받아주셨으면 설치하셨다는 가정하에 바로 설명 들어가겠습니다.

참고로 이 강좌는 조금 밑에 있는 스트리밍 파일퍼오기와 이어집니다.

이미 .flv 파일과 해당 프로그램을 입수하셨다는 가정하에 시작하겠습니다.





일단 유마일 인코더의 항목 추가 버튼을 누른뒤, flv 파일을 선택합니다.
다음으로 옵션설정 버튼을 누르시고,

((-------IMAGE-------))

빨간색으로 표시한 부분을 저와 동일하게 해주십니다.

파일 포멧은 이후 매직원으로 동영상을 자르기 위한거구요,
코덱을 변경하는 이유는 코덱팩을 깔지 않기 위해서 !!!!! 이니 이해해 주시구요.
영상크기는 거의 320x240 사이즈로 flv 파일이 업로드 되지만, 혹시 모르니 선택해주세요,

비트레이트와 프레임 같은 경우는 크레이져의 경우
비트레이트 250, 프레임 20 까진 별다른 끊김 없이 읽어주더군요,
자유롭게 선택하시되, 제가 설정한 값 이상을 설정하실경우 용량의 압?이 생길수 있습니다.

다음으로 음량설정은 지금 건드리지 마시고 기본값으로 놔두세요 ! 이유는 뒤에서 밝혀집니다.




다음으로 변환 버튼을 누르시면 지정 폴더 안에 .avi 파일이 만들어 집니다,
이제 매직원 동영상을 킬차례.
일단 귀찮은걸 최대한 배제하기 위해 업데이트를 하지 않은 ! 매직원 기준으로 계속해서 이어 갑니다.
업데이트 한 매직원도 써봤지만, 이거 영. 별로더라구요.
일단 매직원 동영상 편집을 켜셨다면,

((-------IMAGE-------))

사진이 좀 거대하네요;;; 일단 동영상 불러오기 버튼을 눌러서 아까 유마일 인코더로 변환해 낸 .avi 파일을 불러옵니다.
정상적으로 불러와 진다면 사진의 동영상1 란의 빨간색 동그라미 1 처럼 파일이 불러와 집니다,
그럼 옆의 플레이어를 이용하여 벨소리의 시작 부분을 지정해야 되는데요,
만들고 싶은 시작지점을 플레이어를 이용, 시작, 일시정지 신공을 사용하여 일시정지 상태로 만듭니다.
이후, 잘라내기 버튼을 누르시면 지정한 시작 지점부터 파일의 끝까지 빨간색 동그라미 2 처럼 잘라내 지게 됩니다.
그럼, 이제 끝부분을 지정해야 겠죠?
빨간 동그라미 2 동영상을 선택하고 플레이어의 재생, 일시정지 신공을 사용하여 끝부분을 만들어 냅니다.

((-------IMAGE-------))


사진이 좀 어지럽네요 -_-;;;

위 방법대로 하셨다면 위의 사진처럼 동영상에 3개의 동영상이,
(잘라내기 작업을 더 많이 하셨다면 3개보다 많겠죠? 실제로 저는 미세조정하기 위해 계속 동영상을 자릅니다
이 경우, 동영상들을 재생해보며 내가 만든게 어떤 녀석인가 미리 알아두시는 작업이 필요합니다)
나와 있을텐데요, 본격적으로 벨소리로 만들 녀석을 그림처럼 드래그 하여 아랫쪽 빈공간에 넣어 줍니다.
이제 그 아래 있는 1. 불러오기, 2. 효과 넣기 등등 을 다 건너뛰고

바로 6. 저장하기 버튼을 클릭해 주세요.

((-------IMAGE-------))


이런 창이 나오면 제가 표시한 부분을 저와 동일하게 해주십니다.
총비트 전송률은 올리셔도 무방하나.
그닥 추천드리지 않습니다.
세팅을 마친후 동영상 만들기 버튼을 눌러, wmv 파일을 만들면 거의 모든 과정이 끝나갑니다...
다시 유마일 인코더를 켜시고,
항목 추가를 누르셔서 방금 만든 wmv 파일을 불러와주세요.
처음과 마찬가지로 옵션을 누르십니다.


((-------IMAGE-------))

일단 파일포멧을 휴대폰에서 사용하기위한 skm 으로 설정하시구요,
이제 용량타협을 할차롑니다...
왜 지금 용량타협을 하느냐?
처음부터 용량타협하고 동영상을 만들시, 결과물이 마음에 들지 않는다면 처음부터 다시 해야겠죠 ;ㅁ;....
하지만 지금 용량타협을 해주시면 인코딩만 다시하면 되는 간편한 작업이 되므로 지금 하시는게 좋습니다.
비디오 설정은 자유롭게 설정해 주시구요, (하지만 150에 15.0 을 추천드립니다)
오디오 설정, 비트레이트 96이면 충분하다 봅니다. 뭐, 자유롭게 설정하시길...
다만 오디오 증폭은 1~2데시벨만 올리세요,
3이상 올리시면 소리가 깨지는 성향이 있더군요...
설정을 마치셨으면 변환 !
자 ~ 이제 함께 올려드린 (첨부파일참조) 해더 생성기를 사용하여 해더를 만드시고,

((-------IMAGE-------))

이렇게요 =0=
모토로라 데이터 메니져를 켜신 후에 핸드폰 내장벨소리로 이동 하십니다.
마지막으로 네이버를 켜신 후에,
동영상 벨소리 공유 란에 업로드를 마치시면, 당신도 이제 업로더 !!!

(매직원 동영상으로 중간에 만들어낸 녀석으로 샘플영상까지 보여주면,
당신도 프리미엄 업로더 !!!!!! )
by Anna 안나 2008. 11. 12. 16:01
안녕하세요.. 동영상 자료실에 파일을 올리고 있는 ..... 동영상 변환에 관한 질문이 많아서.. 특히 최적화 된 설정을 묻거나 하시는 경우가 많습니다. 결론은 통일된 최적화된 설정은 존재하지 않쵸 각설하고, 본론으로 들어가면 모든 동영상 인코더들은 공통적으로 해상도/비디오 비트수/오디오 비트수/프레임을 설정하게 되어 있습니다. 제가 주로 미디어 싱크를 써서(일부 한계가 있을때는 버츄얼 덥을 이용하기도 하지만) 변환을 하기 때문에 미디어 싱크 스샷을 쓰지만, 모든 인코더에 공통적으로 적용되는 이야기 입니다.

제가 쓰는 포맷인데요. 중요한건... 1. Screen (해상도) : 동영상의 크기를 설정 - 176x144, 176x220 = 구 폰에 주로 쓰입니다. - 320x240 = 요즘 일반적으로 쓰입니다.(요즘 대부분의 폰의 스펙) - 이 이상의 크기는 일부 고성능 폰에만 적용됩니다. 2. Video Bits (비디오 비트수) : 실질적인 영상의 화질을 설정 - 200kbps(이후 생략) 저화질 영상 -576 제가 씁니다.....(이 이상 올려도 차이가 잘 안 느껴 져서.) -786 (쓰거님의 고화질 강좌에 사용됨....) = 이 수치는 고정이 아니라 자기가 판단해서 설정합니다. 화질을 너무 높이면 용량이 커지기 때문에, 용량 대비 화질 과 자 신의 선호도에 따라서 바뀝니다. 200과 576의 용량 차이만 해도 1.5배에서 2배 사이로 자신이 고화질이 아니면 잘 안본다는 분 외에 사람/ 용량여유가 적은 분들은 조금 낮 출 필요도 있습니다. ( 저는 4G외장메모리를 두개를 같이 쓰기 때문에 별로 용량의 제약을 안 받습니다.) 참고로 보통 pmp에서 사용하는 비트 수가 700에서 1500사이 이기 때문에 pmp보다 화면 크기가 적은 휴대폰은 그 이하의 비트로도 충분히 고화질을 느낄 수 있습니다.ㅐㅗㅓ 3. Audio Bits (오디오 비트수) : 음질을 설정합니다. - 주로 64를 씁니다. 128로 더 나은 음질을 쓰시기도 하구요. 그 이상은 폰에 따라 재생이안될 수도 있습니다. 4. Frame (프레임) : 1초당 화면수, 15일 경우 1초에 15번의 정지화면을 보여 준다는 것입니다. 높이면 더 부드러운 움직임의 동영상이 만들어 집니다. 우리 눈의 프레임 구분 한계가 25에서 +,- 있다고 합니다. 25 이상의 설정은 폰에 따라 재생이 안될 수도 있습니다. -15 애니에 최적화됨.(사견) 일반 폰 영상에도 자주 쓰임 -24 (제가 씀) : 25에 걸려서 오류 나는 것을 막기위해서.... -30 대부분의 영상들이 최초에 이정도 프레임에 제작됨 =폰 성능에 따라 최적화된 프레임이 조금씩 차이가 있다고 알고 있습니다. 일부 24000/15000 등으로 쓰시는 분도 계신데, 그건 인코더 중 24.000, 15.000 등으로 쓰인 것을 잘못 본 것입니다. 5.Cropping(화면 비율) : 4:3 - 보통 폰에 꽉찬 영상이 만들어짐. 예전 구형 티비의 화면 : 실제 티비 화면 보다 옆으로 늘어나서 보이지만 영상 크기가 큼 16:9(10) - 주로 16:9를 씀 영화나 HD방송(요즘 와이드 티비의 화면) : 실제 티비나 영화와 같은 비율의 화면이지만, 폰에 넣었을때 검은색 공백이 위아래로 생겨 크기가 작음 이 다섯가지를 조작해서 영상의 성능에 차이가 생깁니다. 중요한건 2,3,4 은 기존 영상보다 더 크게 설정해도 커질 수가 없다는 점과, 1번을 기존 영상보다 크게 했을 때 화질이 떨어지게 보인다는 점입니다. 초기 파일이 고성능(시간대비 고용량) 일수록 입맛대로 가지고 놀 수 있는 것이죠. 참고로 저는 kh2200 (아트라이팅폰)을 사용합니다. 최적화된 설정을 물으시는 분이 많으신데,,,,,, 최 적화된 설정이란 것은 존재하지 않습니다. 개인의 중요도 차이와 (용량이 커도 고화질/ 고음질이여야 한다. 혹은 적당한 화질이면 저용량일 수록 좋다등등) 폰 기종에 따른 성능 및 폰 액정의 크기/ 개인의 민감성(프레임이 낮으면 끈기는게 눈에 잘 드어 온다/ 아니다 등등) 등 여러 변수가 있습니다. 영상의 목적에 따라서도 차이가 발생합니다. 애니의 경우 15프레임에 300의 영상 비트 64의 음성비트 정도만 해도 남을 정도로 충분한 반면 과격한 액션신의 경우 프레임이 필요하고, 색감이 뛰어난 영화의 경우 영상비트가 높아야 하며, 음악 관련 동영상은 음성비트를 높여야 할 수도 있는 등.. 여러 경우가 발생합니다. 결론은 직접 위 5가지, 특히 2,3,4 그중에서 2,4 을 변화시켜 가며 자신이 생각하기에 최적의 설정을 맞추는 것이죠. 기 존에 1/2세대 pmp(3세대 pmp는 코원 A3, 맥시안 e900등시기에 나온 즉 요즘 나오는 pmp로 변환이 거의 필요 없도록 다빈치 칩같은 고성능 칩을 사용하는 pmp 이고 이 이전 것들은 변환이 필요한 경우가 발생하는 pmp로 1/2세대에 속합니다) 를 사용하시거나, 폰 영상 변환을 하시던 분들은 다 아실 정도의 기초적 내용이였지만 막 동영상 변환을 시작하시거나 시작하려고 하시는 초보 분들께서는 아직 잘 모르시고 필수적으로 알아야 하는 사항입니다. 머리 속에 있는 내용을 쓴 글이라서 맞지 않는 부분 및 주관적 내용이 있을 수도 있습니다. 알려주시면 수정하겠습니다. 많 은 분들이 제 글과 여러 정보를 통해서 자신이 만족하는 영상설정을 찾고, 변환하시고, 또 카페 자료실에 올리는데 동참하시는.... 그런 미래가 오기를 바랍니다. 모두 여러번 설정을 바꿔 변환해야 한다고, 실험 도중 포기하시지 말구 성공하기 바래요. <첨부 = 밑에 댓글을 보고> 음성화면이 밀리는 것은 싱크 일치의 문제인데 프로그램에 따라 차이가 납니다. 제가 미디어 싱크를 쓰는 이유 중 가장 큰 것은 원래 싱크를 맞추기 위해(음성과 영상의 차이 발생을 막기 위해) 만들어 진 프로그램이여서, 싱크가 잘맞는 편이라는 점에 있습니다.(고급 프로그램이면 더 나을 수 있지만.....) 원 래 영상자체의 문제나 폰기능의 문제, 너무 과도한 비디오/오디오 비트수 증가, 기존 코덱차이 및 인코더 간의 특성 , 등이 음성과 영상을 따로 놀게 하는데, 유마일은 고화질 설정에서 싱크 부분에 약점이 있는 걸로 알고 있습니다. PMP 같은 경우에도 실험을 해보면 700~1500사이 비트 4000이상의 비트등에서는 싱크에 문제가 없다가 2000~3000사이 비트에서는 거의 대부분 음성과 영상이 따로 노는 것을 알 수 있습니다.(제가 실험해봐서 압니다..ㅡㅡ0) 주로 쓰는 것 이상에서는 문제가 발생한다는 거죠... 아니면 되게 고화질에서는 문제가 없거나. 이와 마찬가지로 폰도 폰 기종에 따라서 문제가 생기는 비트수가 있고 적정 한계선이 있습니다. 제가 576 비트를 쓰는 이유 중 하나도 700이상의 비트에서 일부 폰 기종에서는 음성 싱크의 오류가 발견되기 때문입니다. 정확히 맞아지는 싱크의 인코딩을 하는 것은 쉬운 일이 아니기 때문에, 대게 민감하시다면 몇번의 실험 및 여러 인코더를 사용하시거나 좀더 고급 프로그램을 사용하셔서 영상을 맞출 필요가 있습니다.
by Anna 안나 2008. 11. 12. 15:53
1. 고음목소리가얇아지는 이유가 복식호흡이 잘안되서그런가요?아니면 다른이유가 있는걸까요?

2. 제가 나름 복식호흡을하고 목에 힘빼는거는 되는것같은데, 잘못된방식이라서그럴까요?

3. 복식호흡으로 한음오래끌기를하면 낮은음으로 한 6~9초 정도밖에안되는것같은데, 잘못된걸까요?
잘못된게아니라면 폐활량을늘리는법좀알려주세요,,

4. 복식호흡이 잘못된거라면 하는방법좀가르켜주세요 ..

5. 마지막으로 제가 한 2옥라?정도까지올라가는것같은데요,
좀더 음을높게올리는방법좀알려주세요




1. 고음목소리가얇아지는 이유가 복식호흡이 잘안되서그런가요?아니면 다른이유가 있는걸까요?

-일단 사람의 목소리는 고음으로 올라갈수록 얇아질 수 밖에 없게 만들어졌습니다.

-다만 몇몇 가수들의 고음에서 두꺼운 소리가 나는 것은, 두가지 이유입니다.

(1. 원래 톤이 두꺼운 목소리, 2. 흉성을 섞어 의도적으로 두껍게 만든 소리)



2. 제가 나름 복식호흡을하고 목에 힘빼는거는 되는것같은데, 잘못된방식이라서그럴까요?

-이 부분은 소리를 직접 들어봐야 하는데 녹음한거 있으면 보내주시면 정확한 답변을 드릴 수 있습니다.



3. 복식호흡으로 한음오래끌기를하면 낮은음으로 한 6~9초 정도밖에안되는것같은데, 잘못된걸까요?

-일단 복식호흡이 정확하게 된다고 가정하고 낮은음으로 오래끌기시 보통 20초정도 할 수 있습니다.

-중3이라면 폐활량의 문제보다는 복식호흡시에 호흡사용에 문제가 있어 보입니다.



4. 복식호흡이 잘못된거라면 하는방법좀가르켜주세요 ..

-공기를 들여마실 때 어깨나 가슴이 들리는것이 아니고, 앞뒤옆배가 튀어나와야 합니다.

(허리 곧게 피고요...어렵습니다..._)

-그렇게 들여마신 공기는 넉놓고 있으면 위로 올라오려는 성질이 있는데,

그것을 명치와 허리가 아플정도로 힘을 주면됩니다. (밑으로 뭘 내리는 느낌으로...대변볼때느낌...)

그러고 숨을 2~30초정도 참는 연습을 먼저 하세요.

(공기를 빼내기전, 저장하는 연습부터 천천히 하는겁니다.)

(공기를 빼기전까지 2~30초동안 튀어나온 배가 움직이지 않아야 합니다. *연습시*)



5. 마지막으로 제가 한 2옥라?정도까지올라가는것같은데요,

-일단 변성기가 지났나요? 변성기전의 음역올리는 연습은 그다지 의미가 없습니다.

-변성기가 지났다면, 복식호흡부터 정확히 하셔야 합니다.

-그냥 소리가 올라간다고 노래에 다 쓸 수 있는게 아니고, 복식호흡이 잘 되야 노래부를때

소리를 사용할 수 있습니다. (고음에서...)

-그리고 음역을 올리는 방법과 기술은 사람마다 차이가 있고, 단순한 설명으로 가능한게 아니고

과정속에서 소리도 들어보고 조언들을 해야하니 가까운 실용음악학원에 가서

레슨을 받기를 추천합니다...^^

'개인 > vocal' 카테고리의 다른 글

음치를 벗어나 절대음감으로 거듭나보자  (2) 2009.02.28
목에 힘빼기 (다음1)  (0) 2008.11.27
복식호흡 , 목에 힘빼기 , 고음  (0) 2008.11.27
복식호흡  (0) 2008.11.09
by Anna 안나 2008. 11. 9. 19:24
일단은 아빠다리를 하고 앉으시거나 의자에 편히 앉으신채로 코로 숨을 들이 마십니다. 이때 주의할 사항은 몸과 어?는 흔들리지 말아야하며 배만 나와야 합니다. 즉 배에 공기를 담는다 라는 생각 으로 숨을 들이마셔주세요, 최대한 마실수 있는 만큼 마쉬대 80%정도만 마셔 주세요, 음 ,, 그러니까 여분의 숨은 남겨두셔야 ,,;; 왠지 말로 설명하려니까 ..좀 힘드네요. 그다음에 내뱉으실때는 입으로 일정하게 내뱉으세요, 뱉으실때 좋은방법으로는 휴지나 종이 한장을 입 앞에 간격을 좀 두고서 일정하게 내뱉으세요, 종이나 휴지로 구분하실수 있으실겁니다. 참고로 내뱉으실땐 처음엔 힘드시겠지만, 코로 들이마실때보다 한 두배정도는 내뱉어 주셔야 합니다. 그렇다고 안되는걸 너무많이하시면 머리가 아프실수 있으니 천천히 꾸준히 해주세요, 하루에 1시간 이런식으 로요. 그리고 복식호흡하시면서 주의사항은 절대로 목에 힘을 주시면 안된다는 겁니다. 편안한 자세로 호흡 편하게 하듯이 하세요. 건강때문에도 사람들이 많이 복식호흡을 하는데요, 이렇듯이 편안하고 안정된 자세로 연습해주세요, 꾸준히 한달에서 세달정도 하시면 효과좀 보실거에요, 무엇보다 꾸준히 해야하는게 중요해요.
by Anna 안나 2008. 11. 9. 19:22
오호..이거좀 실용적인데.

<HTML>

<HEAD>
<TITLE> CSS RollOver </TITLE>
</HEAD>

<BODY>

<style>

a.rollover img { border-width:0px; display:inline; }
a.rollover img.over { display:none; }

a.rollover:hover { border:0px }
a.rollover:hover img { display:none; }
a.rollover:hover img.over { display:inline; }

</style>

<div class="rollover">
<a href="#test" class="rollover"><img src="http://www.blueb.co.kr/bbs/table/JS_50/upload/s_blue.gif"><img src="http://www.blueb.co.kr/bbs/table/JS_50/upload/s_yellow.gif" class="over"></a>
<a href="#test" class="rollover"><img src="http://www.blueb.co.kr/bbs/table/JS_50/upload/s_red.gif"><img src="http://www.blueb.co.kr/bbs/table/JS_50/upload/s_green.gif" class="over"></a>
</div>

</BODY>

</HTML>


이런 기발한 :-)
by Anna 안나 2008. 11. 9. 18:43
본 글은 프라데이에 의해 작성되었습니다.



쩡민님의 블로그 http://blog.naver.com/jeong1278 쓸만한것들 많이있다. 때로 놀라게하는 레어자료들도..

과일장수님의 블로그 http://blog.naver.com/frui2store 정말 진정한 코더들은 다른것이다. 근래 이쪽에관해 그만두었다는 말씀도 있으시던데..

나라디자인 http://naradesign.net 정찬명이라는 닉네임(성명?)을 가지시고, 정말 알찬 블로그를 키우시고계신다. 알이꼭꼭


음..뭐 차례차례 수정하며 추가할 예정이다.^^
by Anna 안나 2008. 11. 9. 18:42
오페라가 빠르다고 하는데 jwBrowser보다는 좀 불편하네요.

그러나 설치하지 않고 사용하고 싶으신 분들은 무설치 버전을 받아 사용하시면 좋을 것 같습니다.

한글을 원하시면 "International Version" 을 다운받으시기 바랍니다.




한글로 바꾸는 방법

1. 다운을 받고 압축을 풀어 실행합니다.




2. 상단 메뉴 중 " Tools-Preferences " 을 누르고




3. 열리는 창에서 "Details..." 를 눌러서 한글로 바꿉니다.




4. Details 를 눌러서 "opera952int" - "locale" - 'ko" 폴더 안에 있는 "ko.lng" 를 선택합니다.
그럼 아래 두 그림처럼 "User interface language" 설정이 한글로 바뀐 것을 확인하실 겁니다.







5. "OK"를 누르시면 한글로 바뀐 모습을 보실 수 있을겁니다.


그럼, 즐거운 웹써핑하시길 바랍니다.^^
by Anna 안나 2008. 11. 9. 18:27
정확한 문서 구조 준수
문서의 루트 요소는 html이 되어야 하며, 이 html 요소는 XHTML 네임스페이스를 지정
해야 한다.
<html xmlns="http://www.w3.org/1999/xhtml">
표준 문서에는 head, title 및 body 구조 요소가 포함되어야 한다. 프레임 세트 문서에는
head, title 및 frameset 구조 요소가 포함되어야 한다
모든 요소는 완벽하게 중첩되어야 한다.
모든 요소들이 완벽하게 내포(nest) 되어야 하는 것은 필수적이다. 중첩(overlapping)이
부적합(illegal)한 것임에도 불구하고 기존 웹 브라우저들에서 널리 관대하게 사용되었다.
<p>This is a <i>bad example.</p></i>
<p>This is a <i>good example.</i></p>
모든 속성 값은 인용 부호(“나 ‘)로 묶어야 한다.
코드를 생성하거나 XHTML을 정리할 때 코드에서 속성 값을 인용 부호로 묶는다.
<a href=http://sample.com>틀린 경우</A>
<a href="http://sample.com">맞는 경우</a>
모든 요소와 속성은 소문자여야 한다.
XHTML 코드를 생성하거나 정리할 때 태그 및 속성의 대/소문자 환경 설정에 상관 없이
XHTML 코드에서 HTML 요소 및 속성의 이름을 소문자로 강제로 설정해야 한다. 이러
한 차이는 XML은 대소문자를 구별(case-sensitive)하므로 필수적이다. 예를 들어, <li>와
<LI>는 서로 다른 태그들이다
<A HREF="http://sample.com">틀린 경우</A>
<a href="http://sample.com">맞는 경우</a>
모든 요소는 닫아야 한다.
DTD에서 EMPTY로 선언된 경우를 제외하고 모든 요소에는 종료 태그가 포함되어야 한
다. 코드를 생성하거나 XHTML을 정리할 때 코드에 닫기 태그를 삽입한다.
빈 요소에는 종료 태그가 포함되거나 시작 태그가 />로 끝나야 한다. 예를 들어, <br>은
잘못된 것이며 <br></br> 또는 <br/>이 올바른 형식이다. 빈 요소로는 area, base,
basefont, br, col, frame, hr, img, input, isindex, link, meta 및 param이 있다.
또한, XML을 사용할 수 없는 이전 브라우저와의 호환성을 위해 /> 앞에 공백이 있어야
한다(예: <br/>가 아니라 <br />).
<img src="http://sample.com/wrong.jpg">
<img src="http://sample.com/right.jpg" />
모든 속성값은 속성이 함께 선언되어야 한다.
모든 속성은 최소화되어 표기 되면 안 된다. XML은 속성의 최소화를 지원하지 않는다. 속
성 값의 짝들은 모두 작성되어야 한다.
a, applet, form, frame, iframe, img, map 등의 요소에는 name 속성뿐만 아니라 id 속
성도 있어야 한다. 예를 들어, <a name="intro">Introduction</a>는 잘못된 것이며 <a
id="intro">Introduction</a> 또는 <a id="section1" name="intro">
Introduction</a>.가 맞다.
또한 <td nowrap>은 잘못된 것이며 <td nowrap="nowrap">이 올바른 형식이다. 최소
화될 수 없는 속성으로는 checked, compact, declare, defer, disabled, ismap, multiple,
noresize, noshade, nowrap, readonly 및 selected가 있다.
<option value="wrong" selected>틀린 경우</option>
<option value="right" selected="selected">맞는 경우</option>
참고: HTML 브라우저에서 HTML 4를 지원하지 않는 경우, 부울 속성이 전체 형식으로
표시되면 브라우저에서 이들 속성을 해석하지 못할 수도 있다.
모든 script 및 style 요소에는 type 속성이 포함되어야 한다.
language 속성이 사용되지 않는 HTML 4 이후로는 script 요소의 type 속성을 반드시
지정해야 한다. 코드를 생성하거나 XHTML을 정리할 때 script 요소에서 type 및
language 속성을 설정하고 style 요소에서 type 속성을 설정한다.
<script type="text/javascript” language="javscript"></script>
<style type="text/css"></style>
모든 img 및 area 요소에는 alt 속성이 포함되어야 한다.
코드를 생성하거나 XHTML을 정리할 때 코드에서 이들 속성을 설정하고, 찾을 수 없는
alt 속성을 보고한다.
모든 SCRIPT내의 태그는 Escape 시켜야 한다.
자바 스크립트에서 HTML 태그 쓰기에서 많은 경우 오류를 낸다. 자바스크립트 내에 데
이터는 CDATA 형식으로 간주되기 때문에 HTML태그가 들어가게 되면 오류를 내게 되
어 있다. 예를 들어 아래 예제는 잘못된 방식이다.
<script type="text/javascript">
<!--
// 틀린 표현!
document.write("</P>");
// -->
</script>
HTML4에서는 SCRIPT내에 데이터 중 시작 태그나 코멘트 부분은 인식이 안되지만 종료
태그는 인식이 되기 때문에 이를 역슬래시로 표시해야 한다.
<script type="text/javascript">
<!?
// 맞는 표현!
document.write("<\/P>");
// -->
</script>
XHTML에서, 스크립트와 스타일 요소들은 #PCDATA 컨텐트를 갖는 것으로 선언된다.
결과적으로, <과 &는 마크업의 시작으로 처리되고, &lt;과 &amp;와 같은 개체(entities)들
은 XML 프로세서(processor)에 의해 각각 <과 &로의 개체 참조로서 인식되므로
CDATA로 마크업 하여 표시하는 게 좋다.
<script type="text/javascript">
<![CDATA[
... <h1>데이터</h1> ...
]]>
</script>
모든 문서 내 URL에서 &를 쓰면 안 된다.
URL에 &가 포함되어 있는 경우 에러를 낼 수 있다. 이것은 &가 XML 엔티티의 시작으
로 인식 하기 때문에 생기는 문제이다. 기존 웹브라우저는 이러한 에러를 복구해 주고 있
지만 유효성 검사기에서는 에러를 내게 된다.
<!?에러! --> <a href="foo.cgi?chapter=1&section=2">...</a>
<!?적합! --> <a href="foo.cgi?chapter=1&amp;section=2">...</a>
HTML 문서 내에서만 &를 &amp;로 바꾸어야 하며 브라우저 주소창이나 이메일 본문에
서는 &를 써야 한다. 웹 서버에서는 &amp;가 아니라 &만을 인식하기 때문이다.
by Anna 안나 2008. 11. 9. 15:39
Introduction W3C는 현재 표준적으로 사용하고 있는 웹 UI의 표준인 HTML 4.x 발 표 이후 HTML 5.x 대신 XHTML 1.0을 발표하였으며, HTML 표준을 이어갈 차세대 웹 UI 표준이라 칭하고 있다. HTML 5라 칭하지 않는 이유는 무엇일까? XHTML은 XML에 기반하여 HTML4를 다시 재구성한 것이기 때문이다. W3C 원문을 인용한다면, “XHTML is a family of current and future document types and modules that reproduce, subset, and extend HTML 4 [HTML4]. XHTML family document types are XML based, and ultimately are designed to work in conjunction with XML-based user agents.” W3C 말들은 대부분 애매모호한 점들이 많지만 일부 해석한다면 “XHTML은 HTML4를 재구성, 서브셋 하고 확장하여 현재와 미래의 문서 타입과 모듈..” 이러한 추상적인 표현들을 정리하여 부연 설명을 하면, “XHTML은 HTML4 문서타입들을 XML 문서 표준에 맞게 재구성하고, HTML4 규격에 맞는 사용도구들에 호환되면서 XHTML 규격에 맞는 사용도구들에서는 더 작동될 수 …” XHTML 은 차세대 UI로서 W3C 권고안이다. 구성의 특징으로는 HTML 4.01의 Element를 그대로 사용하면서 XML 문법을 따르고 있다. 즉, XM 응용분야에서 사용될 수 있는 잘 정의된 HTML이라 정의할 수 있으며, 이러한 특징은 OS, 브라우저, PDA, Mobile 등 다양한 환경에서 단일한 언어로 호환가능한 웹 표준을 적용할 수 있는 것으로 확장될 수 있다. Why XHTML? XHTML이 왜 필요한가? 차세대 UI로서 XHTML을 사용했을 경우 주는 이점은 무엇인가? W3C 원문을 인용하면 “The XHTML family is the next step in the evolution of the Internet.” 이라 정의하고 있으며, 또한 “…Alternate ways of accessing the Internet are constantly being introduced…. Ultimately, it will be possible to develop XHTML-conforming content that is usable by any XHTML-conforming user agent.” 라 하고 있다. 요약한다면 “XHTML은 인터넷 발전의 다음 단계이며, ..(앞으로도)..인터넷에 접속하는 방식들은 계속 소개 되어질 것이며, 궁극적으로 XHTML 은 이러한 모든 것을 지원 가능하게 될 것이다.” 부연 설명을 하자면 다음과 같다. HTML4가 Dynamic HTML을 위해 탄생된 것이라면 XHTML은 인터페이스에 중점을 둔 것이 아니라 유비쿼터스 환경과 같은 구동 환경에 초점을 맞추고 있다. 즉 단순히 HTML4.0을 업그레이드 한 것이 아니라 XML 응용을 바탕으로 다양한 장치와 브라우저 등에 가장 폭 넓게 웹 페이지를 적용할 수 있다는 데에서 의미를 찾을 수 있다. 또한, 기존의 HTML 문서와의 호환성 유지와 함께 더욱 강력하게 확장할 수 있도록 해주는 것이다. 이 의미를 시장의 관점에서 접근했을 때 해석한다면 PC의 모든 브라우저와 모바일 장치의 브라우저 등을 지원하는 단일 언어로서, 미래의 UI 표준 기술로서 XHTML이 위치해 있으며, 차세대 웹 표현을 위한 Markup Language 이라는 것이다. W3C(World Wide Web Consortium) 는 미래의 모든 유선 프로그래밍에 XHTML을 권장하며, 모바일 장치와 같은 작은 화면과 적은 리소스 동원이 가능한 기기인 경우 XHTML의 하위 언어인 XHTML 베이직을 권고한다. XHTML 베이직은 시장 점유율과 업체 영향력 측면에서 차세대 브라우저 표준 방향을 주도하는 WAP 포럼(WAP) NTT도코모(아이-모드)의 지원을 받고 있다. 이러한 반영은 결국 WAP 2.0 기본 표시언어로서 XHTML 베이직을 채택으로 나타나고 있다. 결론적으로 차세대 웹 UI 기술은 결국 어떠한 장치, 어떠한 브라우저 환경하에서도 동일한 언어와 기술 환경하에 표현되어야 한다는 것이며, 바로 이 방향에 XHTML이 있는 것이다. Extensibility XML documents are required to be well-formed (elements nest properly). Under HTML (an SGML application), the addition of a new group of elements requires alteration of the entire DTD. In an XML-based DTD, all that is required is that the new set of elements be internally consistent and well-formed to be added to an existing DTD. This greatly eases the development and integration of new collections of elements. Portability There will be increasing use of non-desktop devices to access Internet documents. By the year 2002 as much as 75% of Internet access could be carried out on these alternate platforms. In most cases these devices will not have the computing power of a desktop computer, and will not be designed to accommodate ill-formed HTML as current browsers tend to do. In fact, if these non-desktop browsers do not receive well-formed markup (HTML or XHTML), they may simply be unable to display the document. 위에서도 언급했지만, XForms는 전통적인 HTML Forms 기술과는 다르게 모델, 입력된 데이타, 그리고 XForms 사용자 인터페이스의 세가지 부분으로 분리함으로써 폼의 내용과 표현을 명확하게 분리하여 다음과 같은 이점을 준다. 3 Strong typing 3 Existing schema re-use 3 External schema augmentation 3 XML submission 3 Internationalization 3 Enhanced accessibility 3 Multiple device support 3 Declarative event handlers 여기서는 간단한 HTML Form Sample을 XForms으로 변환하는 과정을 통해 XForms에 대해 소개하고자 한다. œ Sample. HTML Form <html> <head> <title>eCommerce Form</title> </head> <body> <form action="http://example.com/submit" method="post"> <table summary="Payment method selector"> <tr> <td><p>Select Payment Method:</p></td> <td><label><input type="radio" name="as" value="cash"/>Cash</label> <label><input type="radio" name="as" value="credit"/>Credit</label></td> </tr> <tr> <td><label for="cc">Credit Card Number:</label></td> <td><input type="text" name="cc" id="cc"/></td> </tr> <tr> <td><label for="exp">Expiration Date:</label></td> <td><input type="text" name="exp" id="exp"/></td> </tr> <tr> <td colspan="2"><input type="submit"/></td> </tr> </table> </form> </body> </html>

HTML Form 방식은 Form 데이터, 유효성 체크 등의 제약조건, 프리젠테이션(표현) 처리를 분리하지 못하는 한계를 갖고 있으나 XForms 방법은 이러한 한계를 개선하여 제공할 수 있는 기술적 구조를 제공합니다. 다음은 위 HTML Form을 XForm으로 변환하는 과정들을 간단한 예와 함께 설명하고자 한다. 모델 요소를 추출하여 간단히 변환환 예 <xforms:model> <xforms:submitInfo action="http://examples.com/submit" id="submit"/> </xforms:model> œ Sample. 프리젠테이션 표현을 위해 XForms 방식으로 변환 <selectOne ref="as"> <caption>Select Payment Method</caption> <choices> <item> <caption>Cash</caption> <value>cash</value> </item> <item> <caption>Credit</caption> <value>credit</value> </item> </choices> </selectOne> <input ref="cc"> <caption>Credit Card Number</caption> </input> <input ref="exp"> <caption>Expiration Date</caption> </input> <submit submitInfo="submit"> <caption>Submit</caption> </submit> 변환된 코드의 특징을 보면 디바이스 비종속성을 고려하여 라디오 버튼 객체 표현을 위해 하드코딩 방식을 사용하지 않고 <selectOne> 과 같은 방식으로 표현되었을 뿐만 아니라 XML 기반의 표현 방식을 통해서 명확하고 간결하다. 또한 표현과 데이터를 표준적 스펙에 따라 완벽하게 분리함으로써 XML submission 을 가능하게 한다. Providing XML Instance Data <xforms:model> <xforms:instance> <payment as="credit" xmlns="http://commerce.example.com/payment"> <cc/> <exp/> </payment> </xforms:instance> <xforms:submitInfo action="http://example.com/submit" method="post"/> </xforms:model> 유효성 체크의 예 XForms 은 특정 객체의 Value 체크 또는 객체와 객체간의 상관 관계하의 특정 조건 체크 등을 위해 HTML 방식에서 사용했던 것처럼 스크립트를 사용할 필요가 없다. 위에서 제시된 예제를 기반으로 유효성 체크를 어떻게 처리하는지 소개한다. 조건은 Select Payment Method 에서Credit 를 선택 했을 경우이며, 그 상세 내용은 다음과 같다. 3 Cridit Card Number를 반드시 입력 3 Expiration Date를 반드시 입력 3 Credit Card Number 입력 데이터는 Digit 형이어야 하며, 14-18 자 3 Expiration Date는 month/year 형식의 날짜형 데이터 œ Sample. 유효성 체크 <xforms:bind ref="my:payment/my:cc" relevant="../my:payment/@as = 'credit'" required="true" type="my:cc"/> <xforms:bind ref="my:payment/my:exp" relevant="../my:payment/@as = 'credit'" required="true" type="xsd:gYearMonth"/> <xforms:schema> <xsd:schema ...> ... <xsd:simpleType name="cc"> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{14,18}"/> </xsd:restriction> </xsd:simpleType> ... </xsd:schema> </xforms:schema> HTML Forms을 이용하여 작성하던 구성들이 과연 XForms을 사용할 경우 어떻게 변해야 하는지 그 변화의 감을 잡기 위해 몇 가지 예제를 코드레벨에서 소개하고자 한다. œ Sample. HTML 구성의 예 <html> <head><title>Search</title></head> <body> <form action="http://example.com/search" method="get"> Find <input type="text" name="q"> <input type="submit" value="Go"> </form> </body> </html> XForm 으로 변환시 과연 무엇이 바뀌어야 하는가? 가장 중요한 차이는 하나로 표현되었던 것을 분리하는 것이다. 예를 들자면 Form 객체를 통해서 표현되었던 Submit 객체와 UI 분리 같은 것을 말한다. HTML-Form 객체를 XForm으로 변환하기 위해 기술된 아래의 부분적 코드를 보면 이해가 빠를 것이다. <model> <submission action="http://example.com/search" method="get" id="s"/> </model> <input ref="q"><label>Find</label></input> <submit submission="s"><label>Go</label></submit> œ Sample. 변환된 전체 소스를 본다면 다음과 같다 <h:html xmlns:h="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/2002/xforms">
<h:head>
<h:title>Search</h:title>
<model>
<submission action="http://example.com/search"
method="get" id="s"/>
</model>
</h:head>
<h:body>
<h:p>
<input ref="q"><label>Find</label></input>
<submit submission="s"><label>Go</label></submit>
</h:p>
</h:body>
</h:html> Submit HTML Form은 하나의 방법을 통해 특정서버에 한 곳에 Submit이 가능하지만 XForm은 여러 다른 서버(Different Server)에 또는 여러가지 방법으로 Submit (Multiple Submission) 하는 방법을 제공 한다. <model>
<instance>…</instance>
<submission action="http://example.com/search"
method="get" id="com"/>
<submission action="http://example.org/search"
method="get" id="org"/>
</model> <submit submission="org"><label>Search example.org</label></submit>
<submit submission="com"><label>Search example.com</label></submit> HTML Forms 유저를 위한 XForm 가이드는 전통적 HTML Form을 어떻게 변환해야 하는가에 대해서 Forms Control, Types 등 여러가지 소개하고 있으나 생략한다. 위에서도 언급했지만, XForms는 전통적인 HTML Forms 기술과는 다르게 모델, 입력된 데이타, 그리고 XForms 사용자 인터페이스의 세가지 부분으로 분리함으로써 폼의 내용과 표현을 명확하게 분리하여 다음과 같은 이점을 준다. 3 Strong typing 3 Existing schema re-use 3 External schema augmentation 3 XML submission 3 Internationalization 3 Enhanced accessibility 3 Multiple device support 3 Declarative event handlers 여기서는 간단한 HTML Form Sample을 XForms으로 변환하는 과정을 통해 XForms에 대해 소개하고자 한다. œ Sample. HTML Form <html> <head> <title>eCommerce Form</title> </head> <body> <form action="http://example.com/submit" method="post"> <table summary="Payment method selector"> <tr> <td><p>Select Payment Method:</p></td> <td><label><input type="radio" name="as" value="cash"/>Cash</label> <label><input type="radio" name="as" value="credit"/>Credit</label></td> </tr> <tr> <td><label for="cc">Credit Card Number:</label></td> <td><input type="text" name="cc" id="cc"/></td> </tr> <tr> <td><label for="exp">Expiration Date:</label></td> <td><input type="text" name="exp" id="exp"/></td> </tr> <tr> <td colspan="2"><input type="submit"/></td> </tr> </table> </form> </body> </html>
HTML Form 방식은 Form 데이터, 유효성 체크 등의 제약조건, 프리젠테이션(표현) 처리를 분리하지 못하는 한계를 갖고 있으나 XForms 방법은 이러한 한계를 개선하여 제공할 수 있는 기술적 구조를 제공합니다. 다음은 위 HTML Form을 XForm으로 변환하는 과정들을 간단한 예와 함께 설명하고자 한다. 모델 요소를 추출하여 간단히 변환환 예 <xforms:model> <xforms:submitInfo action="http://examples.com/submit" id="submit"/> </xforms:model> œ Sample. 프리젠테이션 표현을 위해 XForms 방식으로 변환 <selectOne ref="as"> <caption>Select Payment Method</caption> <choices> <item> <caption>Cash</caption> <value>cash</value> </item> <item> <caption>Credit</caption> <value>credit</value> </item> </choices> </selectOne> <input ref="cc"> <caption>Credit Card Number</caption> </input> <input ref="exp"> <caption>Expiration Date</caption> </input> <submit submitInfo="submit"> <caption>Submit</caption> </submit> 변환된 코드의 특징을 보면 디바이스 비종속성을 고려하여 라디오 버튼 객체 표현을 위해 하드코딩 방식을 사용하지 않고 <selectOne> 과 같은 방식으로 표현되었을 뿐만 아니라 XML 기반의 표현 방식을 통해서 명확하고 간결하다. 또한 표현과 데이터를 표준적 스펙에 따라 완벽하게 분리함으로써 XML submission 을 가능하게 한다. Providing XML Instance Data <xforms:model> <xforms:instance> <payment as="credit" xmlns="http://commerce.example.com/payment"> <cc/> <exp/> </payment> </xforms:instance> <xforms:submitInfo action="http://example.com/submit" method="post"/> </xforms:model> 유효성 체크의 예 XForms 은 특정 객체의 Value 체크 또는 객체와 객체간의 상관 관계하의 특정 조건 체크 등을 위해 HTML 방식에서 사용했던 것처럼 스크립트를 사용할 필요가 없다. 위에서 제시된 예제를 기반으로 유효성 체크를 어떻게 처리하는지 소개한다. 조건은 Select Payment Method 에서Credit 를 선택 했을 경우이며, 그 상세 내용은 다음과 같다. 3 Cridit Card Number를 반드시 입력 3 Expiration Date를 반드시 입력 3 Credit Card Number 입력 데이터는 Digit 형이어야 하며, 14-18 자 3 Expiration Date는 month/year 형식의 날짜형 데이터 œ Sample. 유효성 체크 <xforms:bind ref="my:payment/my:cc" relevant="../my:payment/@as = 'credit'" required="true" type="my:cc"/> <xforms:bind ref="my:payment/my:exp" relevant="../my:payment/@as = 'credit'" required="true" type="xsd:gYearMonth"/> <xforms:schema> <xsd:schema ...> ... <xsd:simpleType name="cc"> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{14,18}"/> </xsd:restriction> </xsd:simpleType> ... </xsd:schema> </xforms:schema>
by Anna 안나 2008. 11. 9. 15:37
"What Is RSS?"를 보고 한글로 된 쉬운 RSS 설명서가 필요할것 같아 써봅니다. 기술적인 내용은 가능한 생략하였고 주로 블로그에서 초보자들이 RSS를 이해하고 이용할수 있도록 하는 것을 목적으로 합니다. RSS란 무엇인가?
RSS는 Really Simple Syndication의 머리글자를 딴 말이며, 사이트에 새로 올라온 글을 쉽게 구독할 수 있도록 하는 일종의 규칙입니다. 사이트에서는 바뀐 내용, 새로운 글을 RSS라는 규칙에 따라 제공하면 이용자는 RSS를 읽을 수 있는 프로그램 (보통 RSS리더기로 불리웁니다.)으로 그 내용을 받아올 수 있습니다.RSS로 할 수 있는 일은 무엇인가?
흔히 RSS는 컨텐트 수집(보내는 쪽에서는 배급)의 좋은 방법이라고 말합니다. 왜그러냐면 예를 들어 10개의 사이트에서 업데이트 된 내용을 확인하려면 브라우저를 열고 10개 사이트를 하나씩 방문해서 지난번 읽었던 곳을 찾고 그 뒤로 새로운 글이 올라왔는지를 확인해야 합니다. 1시간뒤에 또 확인해보려면 이 작업을 손으로 하나씩 다시 해줘야 합니다. 그런데 만약 이 10개의 사이트에서 RSS를 제공한다면 RSS리더기를 이용해서 순식간에 확인이 가능합니다. 게다가 일정한 시간간격마다 자동으로 확인을 해주죠. RSS를 이용해서 할수 있는 일은 아주 다양합니다만 블로그에서는 자신이 구독하는 블로그에 새로운 포스트가 올라왔는지를 확인하는 용도로 유용하게 사용할 수 있습니다.이메일과 무엇이 다른가?
사이트에서 사용자에게 새로운 내용을 보내준다는 용도로 보면 이메일로 보내는 뉴스레터,이메일소식지와 비슷할 수도 있지만 RSS는 이메일과는 다릅니다. 우선 이메일은 내용을 보내주는 사이트에 나의 이메일주소를 알려주는 과정이 필요하고 나에게 뉴스레터를 이메일로 발송하면 받은편지함에서 받아봅니다. 스팸편지속에 뉴스레터가 섞일수도 있고 해당사이트에서 보관하고 있는 나의 이메일주소가 악용될 우려도 있습니다. 반면 RSS는 사이트에서 제공하는 RSS주소를 리더기에 입력하기만 하면 사용자가 일방적으로 내용을 긁어옵니다. 더이상 받고 싶지 않으면 RSS주소록에서 그 주소를 삭제하기만 하면 됩니다. 사이트에서는 강제로 RSS를 전송할 방법이 없습니다. 이것을 그림으로 그려보자면 아래와 같습니다.
(그 림에 대해 부연설명 하자면 오른쪽 그림에서 오해가 있을수 있는데, 화살표의 방향이 데이타의 방향이지 의지의 방향은 아닙니다. 즉, 사용자(RSS리더기)가 일방적으로 가져오는 것이지 이메일광고처럼 RSS를 주는 쪽에서 보내고 싶다고 보낼수 있는 것이 아닙니다. 따라서 저 화살표를 사용자는 끊을수 있지만 RSS제공자는 끊긴 화살표를 이을 수 없습니다.) RSS를 제공하는 방법은?
RSS를 제공하는 것을 "RSS Feed"라고 말하기도 합니다. RSS는 일종의 규약이므로 이 규약에 맞게 작성해놓으면 됩니다. 그러나 사이트가 업데이트될때마다 RSS를 손으로 수정해주는 것은 흔히하는 말로 개노가다이며 그래서 대부분의 블로그에서는 이 RSS를 자동으로 생성해줍니다. RSS를 보는 방법은?
RSS링크를 브라우저에서 열어봐도 되긴 하는데 사람이 보기에 그다지 편한 모양새가 아닙니다. RSS리더기를 이용해서 그 주소를 불러오면 알아서 보기편하게 정리해서 보여줍니다. 많이 쓰는 프로그램은 (이것도 그때그때 유행이 있나봅니다.) SharpReader가 있고 요즘은 웹에서 RSS리더기 기능을 구현해주는 bloglines라는 사이트에 많이 가입하시는듯 합니다. 더 많은 리더기는 RSScalendar의 RSS리더기 페이지나 Technology at Harvard Law의 Aggregators페이지에서 찾을 수 있습니다. RSS를 읽을 수 있는 프로그램이 준비되었다면 이제 RSS를 받아와야겠지요? RSS를 제공하는 사이트에서는 RSS링크를 아이콘으로 만들어서 찾기 쉽게 해놓고 있습니다. 등의 아이콘이나 "Syndicate this site" "RSS" 등의 글자로 링크를 만들어 놓고 있습니다. 이 링크의 주소를 복사해서 RSS리더기에서 불러오면 해당사이트의 RSS를 구독하게 되는 것입니다. 특정한 아이콘이나 글자링크를 써야만하는 것은 아니어서 사이트마다 조금씩 RSS링크를 지칭하는 아이콘이나 글자가 다르기도 합니다.
RSS를 제공하는 사이트 몇군데 입니다.
오마이뉴스 전체기사
중앙일보 전체기사
네이버 뉴스의 검색결과를 RSS로
드림위즈의 추천 RSS
Some sources of RSS 2.0 feeds. (Technology at Harvard Law)
Top 100 Most-Subscribed-To RSS Feeds (Radio Community Server) 참고링크들 블로그 배급과 구독을 위한 가장 쉬운 방법, RSS (호찬넷)블로그용어 - RSS와 XML 아이콘, 피드(feed), RSS 구독기 (김중태문화원)RSS 2.0 Specification (Technology at Harvard Law)What is a site feed? (blogger.com)What is RSS? (XML.com)
by Anna 안나 2008. 11. 9. 15:34
해외 CSS관련 테크닉들을 담은 곳을 정리해보았습니다. 좋은 사이트를 알고 계시면 코멘트 달아주세요. 이 문서는 수시로 업데이트 됩니다. 최종 업데이트 : 2004/9/30 레이아웃 Position is Everything CSS Layout - Eric Costello Layout Reservoir - Bluerobot Advanced CSS Layouts: Step by Step - Webreference.com Introduction to CSS Layout - Eric Costello CSS Layouts - Salia.com Colored boxes - one method of builiding full CSS layouts - Maxdesign Layout-o-matic - Inknoise.com CSS Creator Box Lesson 네비게이션 - 리스트 태그를 이용한 메뉴 디자인 Listamatic - Maxdesign Fast Rollovers Without Preload - Pixy Sliding Doors of CSS - Douglas Bowman Sliding Doors of CSS, Part II - Douglas Bowman Pixy-style CSS no-preload rollovers, with PNG support for IE CSS Navigation - Stu Nicholls Free Menu Design - E-lusion 이지미 대체 테크닉(Image Replacement) A New Image Replacement Technique - Stuart Langridge Image Relpacement - no span - Seamus Leahy Facts and Opinion About Fahrner Image Replacement In Defense of Farhner Image Replacement Accessible Image Replacement - Mike Rundle Glider Image Transform Techque - Tom Gilder Using Background-Image to Replace Text - Douglas Bowman Revised Image Replacement - Mezzoblue DOM Image Replacement - Quirksmode Image Replacement - Levin Image Replacement Tests IFR:An FIR Alternatve - Shaun Inman IFR: Revisited and Revised - Shaun Inman sIFR 2.0b2: The Mo’ Betta Beta - Mike Davison 접근성 향상(Accessibility) Dive Into Accessibility Accessify.com Acceessibility - Juicy Studio 폼 디자인(Forms) Styling Form Fieldsets, Legends and Labels - Pixy PNG Alpha Channel Solution in IE 32-bit PNG Degradability in IE PNG Behavior - Webfx XHTML Not Yet. 기타 Rubber Header - Pixy Styling <hr> Generated Content - Westciv
by Anna 안나 2008. 11. 9. 15:33
1. 레이아웃을 나누기 위해 <table>을 사용하지 말것. 대신, CSS를 이용하여 레이아웃을 구성하라. 2. <table>은 표를 보여주기 위한 용도로만 사용을 제한할 것. 최초로 HTML을 제안되었을 때 <table>은 표를 구성하기 위해서 만들어진 태그였습니다. 이것이 레이아웃을 담당하기에 그 기능이 적합했기에 많은 이들이 <table>을 레이아웃을 구성하기 위한용도로 사용하였으며, 더더욱 문제는 최근의 학원이나 책자 등에서는 당여하다는 듯이 레이아웃을 위한 태그이다..라고까지 설명하기에 이르렀습니다. 이전에 MS워드나 아래아한글같은 PC용 워드프로세서에서 "표"를 이용해서 레이아웃을 구성했던 것처럼 <table>도 그 원 기능이 변질되어 버리게 된 것입니다. 현 시점에서는 이러한 기능이 편리할지는 모르겠지만, 가까운 미래에 장애자용 브라우저라든지 논리적 근거를 둔 브라우저가 보급이 되었을 시에는 커다란 문제로 다가올 것입니다. 표와 레이아웃을 위한 예를 보십시요. 구 분 12월 1월 2월 3월 4월 5월 매출액 9,096 9,269 9,341 9,374 9,895 9,177 매출원가 7,892 7,814 7,789 7,961 8,344 7,996 매출총이익 1,204 1,455 1,552 1,413 1,551 1,181 일반관리비 443 464 368 407 463 421 영업이익 760 991 1,184 1,006 1,088 760 영업외손익 -1,088 -879 -981 -1,302 -896 -654 경상이익 -327 111 203 -296 102 106 당기순이익 -243 52 108 14 25 77 위와 같이 <table>을 표로 사용했을시, 각각의 열과 행(colume과 row)는 연계성을 가지고 있으며, 이러한 논리는 장애자용 브라우저에서 상당한 강점을 가집니다. 하지만, <table>을 단지 레이아웃만을 이용하게 사용한다면 [데스크탑]현대멀티캡, 성능/가격 두배로 만족하기!!
[MP3]아이리버 가방 증정 깜짝 이벤트!
[MP3]Yepp 신제품 온라인 런칭 기념 대축제
[MP3]아이오디오 4月 왕대박 사은품 이벤트※ 링크 누르지 마세요...^^...Copy해붙이다보니..링크가 그대로... 논리적으로 위의 예에서는 줄단위로 배열된 이미지와 text, link가 연계성을 가집니다. 하지만, 시각적으로 보았을시에만 이러한 논리를 가질 근거가 되지만, "모음전"과 "사은품"이라는 이미지가 같은 열에 있음으로서 연계성을 가지게 되고 전혀 다른 링크인 text들 마져 연계성을 가진다는 논리가 발생합니다. 혹은 전자와 후자의 반대경우에도 문제가 발생합니다. 연계성을 연산을 해야하는 프로그램으로서는 각각의 연계성을 연산하기 위한 근거가 필요하게 되고, 이러한 근거가 부족하다면 제작자 임의로 이러한 연계성의 증거를 제시해야 하고 됩니다. 이 또한 통일된 표준이라는 월드와이드에 부적합하게 되죠. 별에 별 이유로 <table>태그를 사용함에 있어 레이아웃과 표 두가지 모든용도로 사용하기에는 부적하다는 것입니다. 그래서 레이아웃은 CSS를 사용하는 것이 좋은 방법임을 제시하고 있습니다. 3. 모든 글자는 CSS를 통해 구현할 것. 이는 <font>태그의 사용을 자제하라는 w3c.org의 논조와 동일합니다. <font>태그는 그 기능상 어떠한 논리도 지니고 있지 못하고, 그 문자의 색상이나 스타일의 변화로 인해 인?게 되는 차별성, 부각성등이 시각적 인지에서만 가능하고, 연산이나 장애자들에게는 어떠한 영향도 주지 못한다는 것이죠. 또한, 사이트전체에 규격화된 문자스타일을 규정함으로서 본문, 일반, 강조, 조심...등과 같은 파별성, 부각성, 각각의 level등등, 통일된 접근을 가능하게 하자는 것입니다. 간단하게 말해서, 책하나를 샀을때, 각 chapter별로 서로 다른 문자체와 스타일이 존재한다면, 무엇이 제목이고, 본문이고, 주석이고, 설명인지....애매하게 인식되는 결과를 낳는 것과 같은 맥락입니다. 4. 페이지는 CSS를 사용하지 않아도 논리적이고 읽기가능하도록 제작하라. 논리적이라는 뜻은...각각의 태그와 text, link, image등이 중요도, 강조, history, site depth등의 차이점과 강조의 강약, 단계, level등을 구분하게 하고, 아울러 연계성이 있는 것끼리 하나의 그룹으로 만들어 브라우저가 논리적 연산이 가능하도록 하자는 데 있습니다. 5. 글의 구조는 <h1>~<h7>,<strong>,<p>등을 이용하여 글의 구조를 논리적으로 만들어라. 6. 글의 설명에는 <b>, <center>등을 사용하라. <h1>, <h2>태그는 제목을 표시하는 태그로 <h1>는 가장 중요한 제목, <h2>는 <h1>보다 한단계 낮은 중요도의 제목..같이 1~7까지 중요도의 차이를 쉽게 설명할 수 있게 하고 있습니다. <em>는 emphasis 강조의 뜻을 나타내는 논리 태그이고, <strong>은 strong mphasis <em>보다 한단계 더 강조됨을 나타내는 논리 태그입니다. 강조의 강약이 차이가 있을시에는 이를 사용해서 논리를 설명하라는 것입니다. <p>태그는 각각의 문단을 나타내는 태그로서 문단의 정의와 구분을 담당하게 됩니다. 단순히 <br>태그로 줄을 넘김으로서 시각적 판단만 가능케 하는 페이지를 만들지 말고, <p></p>를 사용하여 논리적으로 문단의 정의와 구분을 가능케 하라는 것입니다. ※ <p>태그를 사용하여 단점인 강제적으로 여백을 생성케하는 것은 CSS의 margin으로 해결이 가능합니다. 이러한 태그들을 사용함으로서 페이지 자체에 논리적 근거를 제시하라는 것입니다. <h1>제헌 헌법 (제정 ; 1948, 7, 17) <h2>대한민국 헌법</h2> <span> 悠久한歷史와傳統에빛나는우리들大韓國民은己未三一運動으로大韓民國을建立하여........... 檀紀4281年7月12日이憲法을制 定한다.</span> <h3>제 1장 </h3> <h3>제 2장 </h3> <h3>제 3장 </h3> <h3>제 4장 </h3> 반대로, 아무 의미없이 단순히 시각적 강조만을 하기 위해서 <em>, <strong>, <p>같은 태그를 사용하지 말고, <b>, <center>같이 아무런 의미가 부여되지 않은 태그를 사용하라는 것입니다. ※ 많은 분들이 착각하고 계시는...<font>, <b>, <i>, <u>, <s>, <center>같은 태그의 사용을 자제하라는 w3c.org의 충고는 any structural or any logical...meaning text에 사용하지 말라는 것입니다. 무작정 이러한 태그의 사용을 자제하라는 것이 아닙니다. HTML4.0은 html은 논리적으로, CSS를 유저의 접근성을 위한 도구로 사용하라는 것입니다. 7. 링크에는 title속성을 사용하라. 8. 이미지에는 alt속성을 사용하라. <a href=.....> 여기에 title="링크의 설명"를 붙여 시각적 판단뿐 아니라 논리적 판단이 가능하도록 하라는 것입니다. 또한 title속성은 여타 문단이나 문장, 이미지, object등에도 설명을 부여하여 논리적 판단이 가능하도록 강력 추천하고 있죠. 시각장애자의 웹서핑를 누군가 도와준다고 가정하면, 도와주는 사람은 분명히 링크명을 말하고 이에 대한 설명도 덧붙여 주겠죠. 그러한 기능을 title속성을 이용하여 하라는 것입니다. 어떤 책에서는 title속성이 풍선말을 가능케 하는 속성이라고 사기를 치는데....반성해야합니다. alt속성은 이미지가 100% load되기 이전에 그 이미지를 설명하도록 하는 속성입니다. 시각적 판단 이전에 그 이미지가 무엇을 설명하고자 하는지 인지하게 하자는 것이죠. <a href="http://blog.naver.com" title="네이버 블로그로 가는 링크">네이버 블로그</a> <img src="fan_1.jpg" alt="환상적인 묘기" title="환상적인 묘기"> 9. 감광성 간질과 같은 환자들을 위하여 반짝이는(blink) 문자, 이미지를 사용하지 말라. 감광성 간질...이게 뭔지 알아내느라 도서관에도 다녀왔습니다. 몇년전, 오락하다가 발작해서 죽은 중학생얘기...그것입니다. blink되는 문자를 판독하기 위해 과도하게 집중하다보면 이런 발작이 일어난다는 것이죠. 그러니깐, 쉽게 읽기 힘들게 만드는 모든 글자와 이미지들의 사용을 자제하자는 겁니다. 제 생각엔, 플래쉬에서도 이러한 부분은 조금 참조해야하지 않을까 싶습니다. 10. ?업을 사용하지 말라. 너무나 많이 들은 얘기인지라 다들 아실거라 믿습니다. ?업이 중요성이 짙은 이슈를 제시하는 기능으로 사용되지만, 시각적 판단으로도 거추장스러운 도구로 인식되어가고 있고, 장애자들에게는 ?업은 거추장을 넘어 장벽으로까지 다가올 것입니다. 페이지의 내용을 이해하기 위해서는 페이지 전체에 논리적인 구조와 해설이 필요한데... 이러한 논리에서 벗어난 새로운 페이지의 등장은 장애자들에게는 이해를 99.9% 불가능하게 하는 도구가 되어 버리는 것입니다. 11. 움직이는 문자를 사용하지 말라. 9번의 것과 비슷한 맥락입니다. 시각적으로도 읽기가 불편한 것이죠. 12. 경고를 뜻하는 붉은색을 아이콘에 사용하라. 시각적 판단이 쉽도록 하기 위해 아이콘을 사용할 때에는 눈에 띄는 붉은 색 계통을 주로 사용하는 것이 좋다는 것입니다. 메타포를 이용한 아이콘이 주류를 이루는 우리나라 실정에는 조금 뒤떨어진 얘기입니다만, 그 취지는 충분히 이해가 가능하실 거라 믿습니다.
by Anna 안나 2008. 11. 9. 15:32
일찍 일어나는 새가 CSS를 잡는다: 구조적 HTML 계획 By Virginia DeBolt
Cascading Style Sheet로 전환하는데 어려움을 겪고 있습니까? CSS를 조금 사용하지만 완벽한 CSS로의 전환은 할 수 없습니까? 당신의 문제는 아마도 Cascading Style Sheet를 웹 페이지를 만드는 과정에서 먼저 충분히 생각하지 않은 것일 겁니다. 당신의 웹 페이지가 어떻게 보일 것인지 생각을 시작하기 전에, 당신은 그 페이지의 의미적이거나 구조적인 내용에 대해서 생각해서 그 HTML이 "CSS-준비상태"가 되도록 해야합니다. 이 문서는 CSS를 위해 구조적으로 준비된 HTML을 처음 만드는 것으로 당신이 프로젝트를 시작하는데 도움을 줄 것입니다. CSS로 전환을 시도하는 몇몇 이들을 괴롭히는 두번째 문제는 그들이 cellpadding, hspace, or align="left" 같이 친숙한 HTML 표현 속성을 CSS의 동일한 표현으로 바꾸는데 익숙하지 못하다는 것입니다. CSS를 위한 HTML을 어떻게 구조화 하는지 배운 후에, 이 친숙한 HTML 속성들을 CSS의 속성으로 어떻게 대체할 수 있는지 이해할 수 있게 도와줄 표를 보여줄 것입니다. 구조적 생각 우리 중 많은 사람들은 우선 "보이는 것"을 생각하고, 그것을 이루기 위해 어떤 이미지, 폰트, 색상 계획, 그리고 그래픽 디자인 속성을 사용해야 하는지 생각하는 것으로 웹페이지 만드는 것을 배웠습니다. 우리는 포토샵이나 파이어웍스를 실행한 후 페이지가 보였으면 하는 바에 정확하게 들어맞을 때까지(픽셀단위로) 작업했습니다. 그런 계획을 가졌을 때, 우리는 HTML을 디자인의 완벽한 픽셀 렌더링으로 만들기 위해 노력하기 시작했습니다. 만약 당신의 HTML 페이지가 CSS-준비상태(혹은 CSS-친숙한 상태)가 되기를 원한다면 그런 "보이는 것"에 대한 생각을 우선 집어 던지고 그 페이지가 가지고 있는 내용의 의미나 구조에 대해 생각하는 것으로 당신의 프로세스를 시작해야 합니다. 보이는 것은 중요하지 않습니다. 당신이 이 문장에 기절해서 쓰러지기 전에, 설명을 하겠습니다. 잘 구조화된 HTML 페이지는 어떤 것으로도 완벽하게 보여질 수 있답니다. CSS Zen Garden은 HTML 페이지가 진짜 어떤 것으로도 보여질 수 있다는 것을 증명하여 웹디자인의 혁명을 일으켰습니다. 이 CSS Zen Garden이 우리를 CSS가 단순한 HTML 페이지가 어떤 식으로도 표현할 수 있게 한다는 것을 알 수 있도록 해주었습니다. HTML은 더이상 단순히 컴퓨터 모니터를 위한 것이 아닙니다. 당신이 포토샵이나 파이어웍스로 만든 훌륭한 화면은 PDA나 핸드폰이나 청각 스크린 리더 같은데서는 전혀 동작 안 할 수도 있습니다. 그렇지만 잘 구조화된 HTML 페이지는 어디로든 갈 수 있고, 어느 인터넷 가능한 장비에서 동작하고, CSS 스타일 시트로 장비에 최적화 된 방식으로 스타일 될 수 있습니다. 생각을 시작 하세요 시작점은 구조적입니다. 몇몇 사람은 의미적이라고도 합니다. 이 용어들의 의미는 당신이 연관된 의미의 블록으로서, 더 간단히 콘텐츠 블록으로서 당신의 콘텐츠를 생각할 필요가 있다는 것입니다. 당신의 다양한 콘텐츠 블록이 사용될 목적에 대해 생각하십시오. 그 다음에 당신 콘텐츠의 의미와 목적에 따른 HTML 구조를 설계하십시오. 당신이 앉아서 당신이 웹페이지에서 원하는 구조적인 조각 조각들을 계획했다면, 이런 것처럼 될 수 있을 것입니다. heading with logo and site name main page content global site navigation subsection navigation search form utility area with shopping cart and check out footer with legal stuff HTML 페이지에 구조적 문맥을 제공하는데 사용되는 일반적인 엘리먼트는 div 입니다. 페이지의 구조적 부분을 위한 id를 할당한 div 엘리먼트를 사용하십시오. 당신의 주요 구조적 콘텐츠 블록은 이렇게 될 수 있을 것 입니다: <div id="header"></div>
<div id="content"></div>
<div id="globalnav"></div>
<div id="subnav"></div>
<div id="search"></div>
<div id="shop"></div>
<div id="footer"></div> 이건 레이아웃이 아니고, 구조입니다. 이것은 콘텐츠 블록으로 정보를 의미적으로 체계화 한 것입니다. 일단 당신이 구조에 필요한 것을 이해하면, 적당한 컨텐츠를 페이지의 적당한 부분에 추가하는 것은 자동으로 됩니다. div는 심지어 다른 div까지 어떤 것이든 포함할 수 있습니다. 당신의 주된 컨텐츠 블록은 당신의 페이지 헤딩, 문단, 이미지, 테이블, 목록 같은 것들을 만드는데 필요한 HTML 엘리먼트를 포함할 것입니다. 연관된 컨텐츠의 블록의 관점에서 우선 생각하는 것을 통해 당신은 이제 페이지의 어디에서나 당신이 원하는 어떤 방식으로도 위치시키고 스타일 할 수 있는 구조적 HTML 엘리먼트를 가지게 되었습니다. 당신의 HTML에서 각 컨텐츠 블록은 페이지에 개별적으로 위치되거나 색상, 폰트, 마진, 배경, 패딩, 정렬 등을 지정할 수 있습니다. 좋습니다. 지금입니다. 당신은 마침내 레이아웃에 대해, 당신의 사이트의 "보여지는 것"에 대해 생각할 준비가 되었습니다. 예를 들어 globalnav는 왼쪽이나 오른쪽에 수평 컬럼이 될 수도 있고, 헤더 밑에 바로 수평으로 올 수도 있습니다. 이것은 어느 위치나 어느 모양이나 될 수 있습니다. 문맥적 셀렉터는 아름다운 것입니다. id 속성을 사용하여 당신의 구조적 컨텐츠 블록을 셋업하는 것은 문맥적 셀렉터를 위한 CSS-준비상태를 만들어 줍니다. 이렇게 id를 가진 div들은 헤딩인지 목록인지 이미지인지 링크인지 아니면 문단인지 페이지의 개별적인 엘리먼트를 위한 정확하고 적절한 셀렉터를 쓸 필요가 있는 문맥을 만듭니다. 예를 들어, #header img라고 쓰면 #content img 와는 완전히 다른 속성이 적용됩니다. 또 다른 예는 당신이 페이지의 다양한 부분에서 #globalnav a:link, or #subnav a:link, or #content a:link. 같은 방법으로 링크를 구분할 수 있다는 것입니다. 또는 #content p and #footer p를 이용하여 centent와 footer에서 다른 방법으로 문단을 보여줄 수도 있습니다. 구조적인 관점에서 당신의 페이지는 이미지와 링크, 리스트, 문단을 포함하고 있습니다. 이 엘리먼트는 렌더링을 위해 어떤 인터넷 장비를 사용하던지 간에, 어떤 스타일 시트를 사용하던지 간에 상관없이 남아있습니다. 조심스럽게 구조화된 HTML 페이지는 아주 심플하고 군더더기 없습니다. HTML의 각 속성은 논리적으로 구조적 목적을 위해 사용됩니다. 문단을 들여쓰기 하기 위해 진짜 인용문이 아닌 곳에 blockquote 태그를 사용하는 것 대신에, 그냥 단순히 margin을 이용해 들여쓰기 한 p 태그를 사용할 수 있습니다. p는 구조고 margin은 보여지기 위한 선택입니다. 전자는 HTML에 속해있고 후자는 CSS에 속해있는 겁니다. 잘 구조화된 페이지는 태그 안에 보여주기 위한 속성을 거의 쓰지 않은 HTML 엘리먼트를 사용합니다. 코드는 간결합니다. <table width="80%" cellpadding="3" border="2" align="left"> 를 쓰는 대신에 단순히 HTML에 <table> 만 쓰면 됩니다. table 엘리먼트를 위한 보여지는 것의 규칙은 CSS로 이동됩니다. 당신은 CSS를 가진 테이블에 당신이 원하는 어떤 모양도 만들어낼 수 있습니다. 그렇지만 구조적인 관점으로 테이블은 단지 테이블이지 그 이상은 아닙니다. 기본 컨셉을 가지고 그것을 실행해 봅시다. 이 기본 구조 컨셉화는 컨텐츠 블록을 위한 당신의 특정한 요구에 적합하게 커질 수 있을 겁니다. 당신이 CSS 스타일 페이지를 살펴본다면, div 속성이 종종 다른 여러개의 div 속성을 포함하고 있다는 것을 알게 될 것입니다. 당신은 "내용을 포함한" div, 또는 "div를 감싸는" div와 다른 타입의 포개는 div들을 볼 수 있습니다. 아래를 보세요. <div id="navcontainer"> <div id="globalnav"> <ul>a list</ul> </div> <div id="subnav"> <ul>another list</ul> </div> </div> 이 예제와 같이 포개지는 div 엘리먼트는 구조적으로는 두개의 리스트일 뿐인 것을 표현하는데 CSS 규칙을 위한 많은 옵션을 가능하게 합니다. 예를 들어 #navcontainer와 #globalnav를 보겠습니다. #navcontainer 규칙은 중앙 정렬인데도 #globalnav 규칙은 왼쪽 정렬일 수 있습니다. 그리고 물론, 구조적 문맥에 사용된 #globalnav ul 이나 #globalnav li 을 위한 표현도 설정할 수 있습니다. #subnav리스트를 위한 규칙 또한 보여지는 관점에서는 완벽하게 다르게 할 수 있습니다. 대체 부분 다음 표는 친숙했던 HTML을 대체할 수 있는 동일한 속성의 CSS를 보여줍니다. HTML attributes and the equivalent CSS properties HTML Attributes CSS Properties Notes align="left"
align="right" float: left;
float: right; With CSS anything can be floated: images, paragraphs, divs, headings, tables, lists, etc. When you float anything, be sure to assign a width to the element you floated. marginwidth="0" leftmargin="0" marginheight="0" topmargin="0" margin: 0; With CSS, margin can be set for any element, not just the body element. More importantly, margins can be set individually for the top, right, bottom and left of any element. vlink="#333399" alink="#000000" link="#3333FF" a:link #3ff;
a:visited: #339;
a:hover: #999;
a:active: #00f; In HTML, link colors were set as an attribute of the body tag and applied uniformly to every link on the page. Using descendant selectors in CSS, link colors can be set to different values in different parts of a page. bgcolor="#FFFFFF" background-color: #fff; In CSS, background-color can apply to any element, not just body and table. bordercolor="#FFFFFF" border-color: #fff; Any element can have a border, the colors of which can be set individually for top, right, bottom and left if desired. border="3"
cellspacing="3" border-width: 3px; With CSS, any element can have a border. Borders can be set uniformly as you see them in the table on this page, or the size, style and color of borders can be set individually for the top, right, bottom and left (or any combination thereof) of any element. When setting the borders for tables, use the table, td or th selectors. When setting the spacing for tables, use the table, td, and th selectors. If you want a single border line between adjacent table cells, use border-collapse: collapse; Border can replace hr when used only as border-top or border-bottom on an element. A rule for border-right and border-bottom can simulate a drop shadow. <br clear="left">
<br clear="right">
<br clear="all"> clear: left;
clear: right;
clear: both; Many two and three column layouts use float to position elements on a page. If part of your presentation depends on background colors or images behind floated elements, you may want to use clear. See the references for "Understanding how Float Behaves" following this chart. cellpadding="3"
vspace="3"
hspace="3" padding: 3px; With CSS, any element can have padding. Padding can be set uniformly or individually for the top, right, bottom and left of any element. Padding is transparent, so background-color or background-image will shine through.
by Anna 안나 2008. 11. 9. 15:31
수정할 파일은 2개, 추가할 파일은 2개입니다.

먼저 추가할 파일부터 추가합니다.

추가할 파일 view_document_fold.html<!--@if(($document_srl || $rnd)&&count($document_list)==1)-->
{@ $block_class = "blog_not_fold"; }
{@ $display_style = "block"; }
<!--@else-->
{@ $block_class = "blog_auto_fold"; }
{@ $display_style = "none"; }
<!--@end-->

<div class="boardRead">
<div class="originalContent">
<div class="readHeader">
<div class="titleAndUser">

<div class="title">
<h4><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getTitle()}</a></h4>
</div>

<!--@if($module_info->display_author!='N')-->
<div class="userInfo">
<!--@if(!$oDocument->getMemberSrl())-->
<div class="author">
<!--@if($oDocument->isExistsHomepage())-->
<a href="{$oDocument->getHomepageUrl()}" onclick="window.open(this.href);return false;">{$oDocument->getNickName()}</a>
<!--@else-->
{$oDocument->getNickName()}
<!--@end-->
</div>
<!--@else-->
<div class="author"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></div>
<!--@end-->
</div>
<!--@end-->

<div class="clear"></div>

</div>

<div class="dateAndCount">
<div class="uri" title="{$lang->document_url}"><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getPermanentUrl()}</a></div>

<div class="date" title="{$lang->regdate}">
<strong>{$oDocument->getRegdate('Y.m.d')}</strong> {$oDocument->getRegdate('H:i:s')} <!--@if($grant->is_admin || $module_info->display_ip_address!='N')-->({$oDocument->getIpaddress()})<!--@end-->
</div>

<div class="readedCount" title="{$lang->readed_count}">{$oDocument->get('readed_count')}</div>

<!--@if($oDocument->get('voted_count')!=0 || $oDocument->get('blamed_count')!=0)-->
<div class="votedCount" title="{$lang->voted_count}">
<strong>{$oDocument->get('voted_count')} / {$oDocument->get('blamed_count')}</strong>
</div>
<!--@end-->

<div class="replyAndTrackback">
<!--@if($grant->write_comment && $oDocument->allowComment()) -->
<div class="replyCount"><a href="#comment" title="{$lang->comment}"><strong>{$oDocument->getCommentcount()}</strong></a></div>
<!--@end-->
<!--@if($oDocument->allowTrackback() && $oDocument->getTrackbackCount() )-->
<div class="trackbackCount"><a href="#trackback" title="{$lang->trackback}"><strong>{$oDocument->getTrackbackCount()}</strong></a></div>
<!--@end-->
</div>

<!--@if($module_info->use_category == "Y" && $oDocument->get('category_srl'))-->
<div class="category" title="{$lang->category}"><a href="{getUrl('category',$oDocument->get('category_srl'), 'document_srl', '')}">{$category_list[$oDocument->get('category_srl')]->title}</a></div>
<!--@end-->

<div class="clear"></div>
</div>

<div class="clear"></div>
</div>

<div class="clear"></div>

<!--@if($oDocument->isExtraVarsExists() && (!$oDocument->isSecret() || $oDocument->isGranted()) )-->
<table cellspacing="0" summary="" class="extraVarsList">
<col width="150" />
<col />
<!--@foreach($module_info->extra_vars as $key => $val)-->
<!--@if($val->name)-->
<tr>
<th scope="row">{$val->name}</th>
<td>
<!--// 확장변수(extra_var)의 type에 따른 값을 출력하기 위해서 특별히 제작된 파일을 include 한다 -->
<!--#include("./extra_var_value.html")-->
</td>
</tr>
<!--@end-->
<!--@end-->
</table>
<!--@end-->

<div class="readBody">
<div class="contentBody">

<!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
<!--%import("filter/input_password.xml")-->
<div class="secretContent">
<form action="./" method="get" onsubmit="return procFilter(this, input_password)">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />

<div class="title">{$lang->msg_is_secret}</div>
<div class="content"><input type="password" name="password" id="cpw" class="inputTypeText" /><span class="button"><input type="submit" value="{$lang->cmd_input}" accesskey="s" /></span></div>

</form>
</div>
<!--@else-->

<!-- 썸네일 출력 -->
<!--@if($oDocument->thumbnailExists($t[1], $t[2], $t[0]))-->
{@ $val->value = $oDocument->getExtraValue($module_info->link_thumbnail)}
{@ $val->type = $module_info->extra_vars[$module_info->link_thumbnail]->type}

<!--@if($module_info->link_thumbnail=='content' && !$val->type && !$val->value)-->
<a href="{$oDocument->getPermanentUrl()}">

<!--@elseif($module_info->link_thumbnail=='view_image' && !$val->type && !$val->value)-->
{@ $uploaded_list = $oDocument->getUploadedFiles() }
<!--@foreach($uploaded_list as $key => $file)-->
{@$file_explode=explode(".",strtoupper($file->source_filename))}
<!--@if($file_explode[1]=="GIF" || $file_explode[1]=="JPG" || $file_explode[1]=="PNG" || $file_explode[1]=="BMP")-->
<a href="#view" onClick="gonyImgWin('{$file->uploaded_filename}')">
<!--@end-->
<!--@end-->

<!--@elseif($val->type && $val->value)-->
<!--#include("./extra_var_list_thumbnail.html")-->

<!--@else-->
<a href="{$oDocument->getPermanentUrl()}">

<!--@end-->
<img src="{$oDocument->getThumbnail($t[1], $t[2], $t[0])}" border="0" alt="" /></a><br /><br />

<!--@end-->
<!-- 썸네일 출력 out-->

<!-- Summary 출력-->
<!--@if($module_info->display_author=='Y' || !$module_info->extra_vars[$module_info->display_content]->type)-->
{@$i=1}
{$oDocument->getSummary($s[$i])}
<!--@elseif($module_info->extra_vars[$module_info->display_content]->type)-->
{@ $val->value = $oDocument->getExtraValue($module_info->display_content)}
{@ $val->type = $module_info->extra_vars[$module_info->display_content]->type}
<!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
{$lang->msg_is_secret}
<!--@else-->
<!--@if($val->type == 'homepage' || $val->type == 'email_address' || $val->type == 'image' || $val->type == 'media')-->
<!--@if(!$grant->view || $oDocument->isSecret() && !$oDocument->isGranted())--><!--@else--> {cut_str(htmlspecialchars($val->value),$s[1], '...')}<!--@end-->
<!--@else-->
{@$i=1}
<!--@if(!$grant->view || $oDocument->isSecret() && !$oDocument->isGranted())--><!--@else--> <!--#include("./extra_var_list.html")--><!--@end-->
<!--@end-->
<!--@end-->
<!--@end-->
<!-- Summary 출력 out-->

<span class="moreInfo"><a href="{$oDocument->getPermanentUrl()}">More..</a></span>
<!--@end-->

<div class="clear"></div>

<!-- 서명 / 프로필 이미지 출력 -->

</div>
</div>
</div>

<!-- 목록, 수정/삭제 버튼 -->
<div class="contentButton">
<!--@if($module_info->default_style != 'blog')-->
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
<!--@end-->
<!--@if($oDocument->isEditable())-->
<a href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}" class="button"><span>{$lang->cmd_modify}</span></a>
<a href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}" class="button"><span>{$lang->cmd_delete}</span></a>
<!--@end-->
</div>

</div>

<!-- 엮인글 -->
<!--@if($oDocument->allowTrackback())-->
<!--#include("./trackback.html")-->
<!--@end-->

<!-- 댓글 -->

<!-- 댓글 입력 폼 --><!-- 글 내용 보여주기 -->


view_document_nofold.html
<!-- 글 내용 보여주기 -->
<!--@if(($document_srl || $rnd)&&count($document_list)==1)-->
{@ $block_class = "blog_not_fold"; }
{@ $display_style = "block"; }
<!--@else-->
{@ $block_class = "blog_auto_fold"; }
{@ $display_style = "none"; }
<!--@end-->

<div class="boardRead">
<div class="originalContent">
<div class="readHeader">
<div class="titleAndUser">

<div class="title">
<h4><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getTitle()}</a></h4>
</div>

<!--@if($module_info->display_author!='N')-->
<div class="userInfo">
<!--@if(!$oDocument->getMemberSrl())-->
<div class="author">
<!--@if($oDocument->isExistsHomepage())-->
<a href="{$oDocument->getHomepageUrl()}" onclick="window.open(this.href);return false;">{$oDocument->getNickName()}</a>
<!--@else-->
{$oDocument->getNickName()}
<!--@end-->
</div>
<!--@else-->
<div class="author"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></div>
<!--@end-->
</div>
<!--@end-->

<div class="clear"></div>

</div>

<div class="dateAndCount">
<div class="uri" title="{$lang->document_url}"><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getPermanentUrl()}</a></div>

<div class="date" title="{$lang->regdate}">
<strong>{$oDocument->getRegdate('Y.m.d')}</strong> {$oDocument->getRegdate('H:i:s')} <!--@if($grant->is_admin || $module_info->display_ip_address!='N')-->({$oDocument->getIpaddress()})<!--@end-->
</div>

<div class="readedCount" title="{$lang->readed_count}">{$oDocument->get('readed_count')}</div>

<!--@if($oDocument->get('voted_count')!=0 || $oDocument->get('blamed_count')!=0)-->
<div class="votedCount" title="{$lang->voted_count}">
<strong>{$oDocument->get('voted_count')} / {$oDocument->get('blamed_count')}</strong>
</div>
<!--@end-->

<div class="replyAndTrackback">
<!--@if($grant->write_comment && $oDocument->allowComment()) -->
<div class="replyCount"><a href="#comment" title="{$lang->comment}"><strong>{$oDocument->getCommentcount()}</strong></a></div>
<!--@end-->
<!--@if($oDocument->allowTrackback() && $oDocument->getTrackbackCount() )-->
<div class="trackbackCount"><a href="#trackback" title="{$lang->trackback}"><strong>{$oDocument->getTrackbackCount()}</strong></a></div>
<!--@end-->
</div>

<!--@if($module_info->use_category == "Y" && $oDocument->get('category_srl'))-->
<div class="category" title="{$lang->category}"><a href="{getUrl('category',$oDocument->get('category_srl'), 'document_srl', '')}">{$category_list[$oDocument->get('category_srl')]->title}</a></div>
<!--@end-->

<div class="clear"></div>
</div>

<div class="clear"></div>
</div>

<div class="clear"></div>

<!--@if($oDocument->isExtraVarsExists() && (!$oDocument->isSecret() || $oDocument->isGranted()) )-->
<table cellspacing="0" summary="" class="extraVarsList">
<col width="150" />
<col />
<!--@foreach($module_info->extra_vars as $key => $val)-->
<!--@if($val->name)-->
<tr>
<th scope="row">{$val->name}</th>
<td>
<!--// 확장변수(extra_var)의 type에 따른 값을 출력하기 위해서 특별히 제작된 파일을 include 한다 -->
<!--#include("./extra_var_value.html")-->
</td>
</tr>
<!--@end-->
<!--@end-->
</table>
<!--@end-->

<div class="readBody">
<div class="contentBody">

<!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
<!--%import("filter/input_password.xml")-->
<div class="secretContent">
<form action="./" method="get" onsubmit="return procFilter(this, input_password)">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />

<div class="title">{$lang->msg_is_secret}</div>
<div class="content"><input type="password" name="password" id="cpw" class="inputTypeText" /><span class="button"><input type="submit" value="{$lang->cmd_input}" accesskey="s" /></span></div>

</form>
</div>
<!--@else-->
{$oDocument->getContent()}
<!--@end-->

<!-- 서명 / 프로필 이미지 출력 -->
<!--@if($oDocument->getProfileImage() || $oDocument->getSignature())-->
<div class="memberSignature">
<!--@if($oDocument->getProfileImage())-->
<div class="profile"><img src="{$oDocument->getProfileImage()}" alt="profile" /></div>
<!--@end-->
<!--@if($oDocument->getSignature())-->
<div class="signature">{$oDocument->getSignature()}</div>
<!--@end-->
<div class="clear"></div>
</div>
<!--@end-->
</div>
</div>

{@ $tag_list = $oDocument->get('tag_list') }
<!--@if(count($tag_list))-->
<div class="tag">
<ul>
<!--@for($i=0;$i<count($tag_list);$i++)-->
{@ $tag = $tag_list[$i]; }
<li><a href="{getUrl('search_target','tag','search_keyword',$tag,'document_srl','')}" rel="tag">{htmlspecialchars($tag)}</a><!--@if($i<count($tag_list)-1)-->,&nbsp;<!--@end--></li>
<!--@end-->
</ul>
</div>
<!--@end-->

<!--@if($oDocument->hasUploadedFiles())-->
<div class="fileAttached">
{@ $uploaded_list = $oDocument->getUploadedFiles() }
<ul>
<!--@foreach($uploaded_list as $key => $file)-->
<li><a href="{getUrl('')}{$file->download_url}">{$file->source_filename} ({FileHandler::filesize($file->file_size)})({number_format($file->download_count)})</a></li>
<!--@end-->
</ul>
<div class="clear"></div>
</div>
<!--@end-->
</div>

<!-- 목록, 수정/삭제 버튼 -->
<div class="contentButton">
<a href="{getUrl('','mid',$mid,'page',$page,'document_srl','','listStyle',$listStyle)}" class="button"><span>{$lang->cmd_list}</span></a>
<!--@if($oDocument->isEditable())-->
<a href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}" class="button"><span>{$lang->cmd_modify}</span></a>
<a href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}" class="button"><span>{$lang->cmd_delete}</span></a>
<!--@end-->
</div>

</div>

<!-- 엮인글 -->
<!--@if($oDocument->allowTrackback())-->
<!--#include("./trackback.html")-->
<!--@end-->

<!-- 댓글 -->
<a name="comment"></a>
<!--#include("./comment.html")-->

<!-- 댓글 입력 폼 -->
<!--@if($grant->write_comment && $oDocument->isEnableComment() )-->
<!--%import("filter/insert_comment.xml")-->
<form action="./" method="post" onsubmit="return procFilter(this, insert_comment)" class="boardEditor" >
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$oDocument->document_srl}" />
<input type="hidden" name="comment_srl" value="" />
<input type="hidden" name="content" value="" />
<div class="boardWrite commentEditor">
<div class="userNameAndPw">
<!--@if(!$is_logged)-->
<label for="userName">{$lang->writer}</label>
<input type="text" name="nick_name" value="" class="userName inputTypeText" id="userName"/>

<label for="userPw">{$lang->password}</label>
<input type="password" name="password" value="" id="userPw" class="userPw inputTypeText" />

<label for="emailAddress">{$lang->email_address}</label>
<input type="text" name="email_address" value="" id="emailAddress" class="emailAddress inputTypeText"/>

<label for="homePage">{$lang->homepage}</label>
<input type="text" name="homepage" value="" id="homePage" class="homePage inputTypeText"/>
<!--@else-->
<input type="checkbox" name="notify_message" value="Y" id="notify_message" />
<label for="notify_message">{$lang->notify}</label>
<!--@end-->

<input type="checkbox" name="is_secret" value="Y" id="is_secret" />
<label for="is_secret">{$lang->secret}</label>

</div>

<div class="editor">{$oDocument->getCommentEditor()}</div>
</div>

<div class="commentButton tRight">
<span class="button"><input type="submit" value="{$lang->cmd_comment_registration}" accesskey="s" /></span>
</div>
</form>
<!--@end-->
수정할 파일style_blog.html <!--#include("./view_document_nofold.html")-->_nofold 를 추가



수정전
<!--// 글이 선택되어 있거나 검색어가 있으면 목록을 출력 -->
<!--#include("./style.list.html")-->수정후
<!--// 글이 선택되어 있거나 검색어가 있으면 목록을 출력 -->
<!--@foreach($document_list as $no => $oDocument)-->
<div class="viewDocument">
<!--#include("./view_document_fold.html")-->
</div>
<!--@end-->

수정전
<div class="viewDocument">
<!--#include("./view_document.html")-->
</div>수정후
<div class="viewDocument">
<!--#include("./view_document_nofold.html")-->
</div>
수정전
<div class="viewDocument">
<!--#include("./view_document.html")-->
</div>
수정후
<div class="viewDocument">
<!--#include("./view_document_fold.html")-->
</div>
style_blog.html 수정된 파일(zbXE 1.0.6기준)



<!-- 검색된 글 목록이 있고 권한이 있을 경우 출력 -->
<!--@if($grant->list)-->

<!--@if($category || $search_keyword)-->

<!--@if($oDocument->isExists())-->
<div class="viewDocument">
<!--#include("./view_document_nofold.html")-->
</div>
<!--@end-->

<!--// 글이 선택되어 있거나 검색어가 있으면 목록을 출력 -->
<!--@foreach($document_list as $no => $oDocument)-->
<div class="viewDocument">
<!--#include("./view_document_fold.html")-->
</div>
<!--@end-->

<!--@elseif($oDocument->isExists())-->

<div class="viewDocument">
<!--#include("./view_document_nofold.html")-->
</div>

<!--@else-->

<!--// 공지사항 -->
<!--@if($notice_list)-->
<div class="blogNotice">
<!--@foreach($notice_list as $no => $document)-->
<div class="item">
<span class="date">[{$document->getRegdate("Y-m-d")}]</span>
<a href="{getUrl('document_srl',$document->document_srl,'cpage','')}">{$document->getTitle()}</a>

<!--@if($document->getCommentCount())-->
<span class="replyAndTrackback" title="Replies"><img src="./images/{$module_info->colorset}/iconReply.gif" alt="" width="12" height="12" class="icon" /> <strong>{$document->getCommentCount()}</strong></span>
<!--@end-->

<!--@if($document->getTrackbackCount())-->
<span class="replyAndTrackback" title="Trackbacks"><img src="./images/{$module_info->colorset}/iconTrackback.gif" alt="" width="12" height="13" class="trackback icon" /> <strong>{$document->getTrackbackCount()}</strong></span>
<!--@end-->

{$document->printExtraImages(60*60*$module_info->duration_new)}
</div>
<!--@end-->
</div>
<!--@end-->

<!--// 일반글 -->
<!--@foreach($document_list as $no => $oDocument)-->
<div class="viewDocument">
<!--#include("./view_document_fold.html")-->
</div>
<!--@end-->

<!--@end-->

<!--@end-->



**.css (style file)
.boardRead .readBody .contentBody span.moreInfo a {}
위처럼 지정해줍니다. 예시는 아래와 같습니다.
.boardRead .readBody .contentBody span.moreInfo a { float:right; padding-top:5px; padding-left:16px; }
.boardRead .readBody .contentBody span.moreInfo a {color:#6b9228; font:bold 11px Arial, Helvetica, sans-serif; background:url("../images/glossary/iconTrackback.gif") no-repeat left 8px;}


이렇게만 잘 따라하셔도.. More 은 조심스럽게 추가됩니다.

블로그 메인에, 사용자에게 불필요한 메모리를 주는것을 막읍시다~^_^
어서들 적용하세요♡
by Anna 안나 2008. 11. 9. 01:56