본문 바로가기

Programming/Web41

이클립스 jquery validator 에러 jquery 에러가 나는 프로젝트를 선택한다. project -> properties -> javascript -> include path -> source -> edit -> exclude patterns -> add **/jquery*.js 적용~ 2014. 5. 27.
ajax 순차적으로 진행을 위한 방법 1st ajax success부분에 2nd ajax 로직을 넣어라. function ajaxModule(DATA,Url,Fn){ $.ajax({ type:"POST", //POST GET url:Url, //PAGEURL data : DATA, timeout : 30000, //제한시간 지정 cache : false, //true, false success: function whenSuccess(arg){ //SUCCESS FUNCTION Fn(arg); }, error: function whenError(x,e){ //ERROR FUNCTION ajaxErrorAlert(x,e); } }); } 2014. 5. 23.
web css 특정 클래스만 제외 시키기 .btn { a; } .btn:not(.glass) { b; } a 와 b 가 전부 적용된다. a 만 적용된다. 2014. 4. 9.
input, select, button 등에 disable css로 설정하기 select[disabled],input[disabled], .btn[disabled], .disabled { opacity: 0.5; filter: alpha(opacity=50); cursor: not-allowed; } 2014. 4. 9.
특정한 시간에 화면 refresh 특정한 시간에 화면 refresh function getTodayTime(){ var today = new Date(); var h=today.getHours(); var m=today.getMinutes(); if(h===6){ if(m===51){ window.location.reload(); } setTimeout("getTodayTime()", 1*60*1000); }else{ setTimeout("getTodayTime()", 40*60*1000); } } getTodayTime(); 2014. 3. 25.
span에 width 적용 span style="display:inline-block; width:25%;"> 2013. 10. 24.
두가지 속성을 가지는 클래스를 선택하고 싶을 때 $(".info, .line") 는 info or line의 의미를 가진다. $("[class*=info][class*=line]") 는 info and line의 의미를 가진다. 2013. 10. 24.
jQuery 2. 요소 선택 방법 - 셀렉터 jQuery 2. 요소 선택 방법 - 셀렉터 jQuery는 뭐?선택하고 조작하고, 선택하고 조작하고... 그러니, 우선 선택하는 방법을 정리해봅니다. 셀렉터를 이용해서 HTML 태그 요소를 선택하는겁니다. 1. 태그 셀렉터$("h1").html 문서내의 ... 을 선택합니다. 헤드라인 2. id 셀렉터$("#title").html 태그요소중에 id="title" 인 요소를 선택합니다. 헤드라인 만약 h1 태그중에 id가 title 인 요소를 선택하려면, 아래와 같이 셀렉터를 작성할 수 있습니다. $("h1#title"). 3. class 셀렉터$(".title").html 태그요소중에 class="title" 인 요소를 선택합니다. 헤드라인 만약 h1 태그중에 class가 title 인 요소를 선택하려면.. 2013. 10. 24.
자바스크립트 focus() 대신 location.hash 사용하기 $("#focusId01").focus(); document.getElementById("focusId01").focus(); 첫번째 명령이 안되면 두번째 명령으로 사용했다. 하지만 크롬에서는 이상하게 focus() 함수가 작동을 안한다... 그러다가 알게된 location.hash location.hash = "focusId01"; 위와 같이 사용하면 크롬에서도 된다. -끝- 2013. 8. 27.