본문 바로가기

jQuery

(76)
jQuery 플러그인, input mask 입력 마스크 o http://digitalbush.com/projects/masked-input-plugin/ 무료
jQuery 1.7.x .on() VS .one() .bind() .live() .delegate() 그리고 mobileinit http://www.elijahmanor.com/2012/02/differences-between-jquery-bind-vs-live.html - one() 이미 명시된 요소에 대한 이벤트 1회 실행- bind() 이미 명시된 요소에 대한 이벤트 발생시 마다 실행- live() 동적으로 생성될 요소에 대한 이벤트 발생시 마다 실행- mobileinit() jquery 와 jquerymobile 자바스크립트 사이에서 정의하고 1회만 실행$(document).live('mobileinit',function(){ ... }); 와 같이 정의. http://happyourlife.com/170live VS die, live VS delegate, delegate VS undelegate
jquery index - $('..').index(this) http://pyungyi.blogspot.com/2012/01/jquery.html
jquery 로 json 을 사용하는 방법 2가지, $.ajax 와 $.get - $.ajax 사용 http://najsulman.tistory.com/598http://findfun.tistory.com/382 관련내용 - $.get 사용 http://blog.daum.net/badog/4458118 http://whitememo.tistory.com/163 - json 타입의 데이타. { 와 } 는 Json 데이타 임을 명시, [ 와 ] 는 배열임을 명시.{"keyA":"valueA", "keyB":"valueB"} 2 개의 데이타. .ajax 의 success 에 json 으로 정의된 경우, json.keyA 는 valueA 가 된다.[{"keyA":"valueA"}, {"keyA":"valueB"}] 1 개의 데이타로 구성된 배열. $(json).each(function()..
타이머, setInterval setTimeout o http://zinee-world.tistory.com/287, 타이머 카운트 다운 화면 표시 o http://naggingmachine.tistory.com/800 $('...').bind('paste', function(e){ var o = $(this); setTimeout(function(){ var text = $o.val(); alert(text); }, 100); }); $(window).load(function(){ setTimeout(scrollTo, 0,0,1); // 모바일 기기에서 화면이 열린 다음 주소창을 닫는 효과}); o http://ramses8.tistory.com/568var timer = setInterval(function (){ alert('Timer Start'..
jQuery 와 Java 로 XML DOM 다루기 o 먼저는 jQuery 로 XML 데이타 가져오는 방법 http://www.xgenesis.org/webProgramming/5927995 $.ajax({ type: "get", // post url : "sample.xml", dataType : "xml", success: function(xml) { $(xml).find("data").each(function(){ // $(xml) 은 Ajax 리턴값의 Root Tag. each() 는 find 결과가 배열일 경우에 대한 방비 var title = $(this).find("title").text(); // attr('AttrName') 속성값 추출 var linkUrl = $(this).find("link_url").text(); var linkTa..
removeClass() 와 addClass() 의 조합, attr() 의 사용으로도 해결 못한 것을 css() 로 해결 위와 같이 스타일이 정의된 상태에서 아래와 같은 코드가 적용되지 않을 때가 있네요. $('...').removeClass('aaa').addClass('bbb'); cf. removeClass('aaa bbb ccc').addClass('ddd eee'); 이런식으로 사용이 가능 removeClass() 와 addClass() 의 조합이 안 된다면, attr() 은 어떨까 싶어서 시도해 보니.. 이것도 안 되고. ㅠ.ㅜ $('...').attr('class','bbb'); 이때 가장 기초적인 함수 css() 를 사용했더니 되더군요. $('...').css('background',args[3]); 아, 이런 경우를 뭐라 해야 할지.. 아무튼, 간혹 제대로 동작하지 않는 상황에서의 해결법은.. 가장 기초적인..
테흐 La Tex 를 jQuery 로, 참 대단하다는.. http://www.ezsolver.co.kr/mobile/jquery_mobile_ex_03.html#/mobile/jquery_mobile_ex_03.html