jQuery 썸네일형 리스트형 [jQuery] next() 함수 고찰 [jQuery] next() 함수 고찰 /* #1 */ $("[SELECTOR]").click(function() { if ( $(this).next().next().next().val() == "Y" ) { [CODE] } } /* #2 */ $("[SELECTOR]").click(function() { if ( $(this).closest("td").find(".cls3").val() == "Y" ) { [CODE] } } #1.은 hidden 으로 설정된 input 엘리먼트의 순서가 바뀌면 안된다. #2.는 class 나 id로 값을 찾기때문에 엘리먼트의 순서가 바뀌어도 상관없다. (closest 나 siblings) 근데.. 왜 많은 개발자들이.. #1. 처럼 next()를 중첩하여 사용하는것을 .. 더보기 [jQuery] javascript에서 jQuery의 function 사용법 my_function = null; $(function() { var PageFunc = { testFunc : function() { alert("123456789"); } } my_function = PageFunc; }); function test() { my_function.testFunc(); } 더보기 [jQuery] 동적 link css 변경(로딩) // Switch StyleSheets with jQuery if ( 1 = 1 ) { $("link[title='title1']").attr("href", "c.css"); } else { $("link[title='title1']").attr("href", "d.css"); } 더보기 [JQuery] select box 제어 $("select[name=name]").attr("disabled", true); $("select[name=name]").attr("readonly", true); 더보기 이전 1 다음