본문 바로가기

반응형

jQuery

jquery fullCalendar 에서 title html 사용하기 fullCalendar 를 이용하여 일정같은것을 만들때 내용에 볼드처리하던지 일부 글자에 색상을 넣고 싶은대 는 > 으로 변환되어 들어간다. 태그를 넣으면 이게 텍스트로 그대로 보이게 된다. 이것을 html 로 적용하려면 다음과 같이 사용하면 된다. fullCalendar $('#calendar').fullCalendar({ ... ,eventRender: function (event, element) { element.find('.fc-title').html( element.find('.fc-title').text() ); } .... } 더보기
jQuery는 이벤트를 어떻게 처리하는가? jQuery는 이벤트를 어떻게 처리하는가? http://d2.naver.com/helloworld/1855209 jQuery를 사용할 때 이벤트 처리는 아주 빈번하게 사용하는 기능 가운데 하나입니다. 이 글에서는 jQuery 내부에서 이벤트를 어떻게 처리하는지 설명합니다. 먼저 jQuery에서 사용할 수 있는 다양한 이벤트 처리 방법을 살펴보고, jQuery의 이벤트 객체와 구조를 살펴보겠습니다. 마지막으로 이벤트를 처리하는 각 단계에서 실제 어떤 흐름을 거쳐 이벤트를 처리하는지 확인하겠습니다. JQuery 이벤트에 대해 쉽게 설명된글이 있어 링크 남깁니다. 더보기
jQuery 애니메이션은 어떻게 작동하는가? jQuery 애니메이션은 어떻게 작동하는가? - 기본 편 http://d2.naver.com/helloworld/0265052 "웹 개발에서 가장 많이 사용하는 JavaScript 프레임워크는 단연 jQuery일 것입니다. 2006년 6월 30일 존 레식(John Resig)이 jQuery 1.0a를 공개한 이후 jQuery는 꾸준히 발전해 지금은 업계의 현실적인 표준이라고 말해도 손색이 없을 만큼 성장했습니다. jQuery는 DOM을 제어하고 이벤트를 처리하는 일을 주로 담당하지만, 그 외에도 웹 개발을 쉽게 할 수 있게 도와주는 많은 기능을 제공합니다. 이 글에서는 jQuery가 제공하는 기능 가운데 jQuery.fn.animate() 함수에 관해 이야기하려 합니다. "jQuery 애니메이션은 어떻게.. 더보기
jquery ajax 로 dynamic 하게 항목(row) 지우기(remove) 목록으로 나열되어있는 항목들이 있을때 하나씩 버튼등을 눌러서 하나씩 삭제할때 값을 전송하여 화면 전체가 reloading 되면 화면이 깜빡이는 현상과 스크롤이 이동되는 현상을 격어야 한다. 간단하게 ajax 를 사용해서 서버단에서 삭제 처리와 목록요소만 지우는 방법으로 처리해보자. php 사용예를 들어서 다음처럼 목록이 화면에 출력이 되고 .... 더보기
jquery 으로 iframe 내용에 접근하기 iframe 내에 있는 항목등을 접근하여 값을 가져온다거나 값을 주어야 할 경우가 있다. 요즘은 jquery 를 많이 사용하다 보니 jquery 로 접근하여 사용하면 편리할거 같은대 iframe 을 selector 로 해도 동작하지 않았다. 찾아보다 다음과 같은 방법으로 접근해보니 정상동작하였다. iframe 은 $('iframe[src="sample.htm"]') 이나 $('iframe[name="iframename"]') 등으로 선택하고 $('iframe[src="sample.htm"]').contents() 으로 iframe 내부에 접근한다. 그다음은 $('iframe[src="sample.htm"]').contents().find("body") 처럼 하면 된다. 나의 경우는 iframe 안에 또 .. 더보기
jQuery Selectors jquery 셀렉터가 헤깔리는 경우가 많은대 많이 사용하기에 참고용으로 남겨둔다. jQuery Selectors Selector Example Selects * $("*") All elements #id $("#lastname") The element with id="lastname" .class $(".intro") All elements with class="intro" .class,.class $(".intro,.demo") All elements with the class "intro" or "demo" element $("p") All elements el1,el2,el3 $("h1,div,p") All , and elements :first $("p:first") The first elemen.. 더보기
detect-mobile-devices 모바일 체크 /** * jQuery.browser.mobile (http://detectmobilebrowser.com/) * * jQuery.browser.mobile will be true if the browser is a mobile device * **/ (function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phon.. 더보기
Disable or enable an input field with jQuery Disable or enable an input field with jQuery For jQuery 1.6 or above there is prop() function and lower jQuery versions have attr() function which can be used to disable or enable an input field. Further more DOM object’s disabled property also works with any version of jQuery to disable or enable an input field. Single Input If you are dealing with just an element then relying on the actual DOM.. 더보기
jQuery Selectbox plugin 출처 : http://www.bulgaria-web-developers.com/projects/javascript/selectbox/ 소스 : 더보기
반응형 또는 모바일 페이지에 이미지맵(image map) 사용하기 이미지맵을 사용하여 홈페이지를 제작하는대 반응형으로 coding 하는경우 문제가 생깁니다. 원하는 영역의 크기가 변하기때문이죠. 이럴때 jquery 를 이용해서 해결 할 수 있습니다. jQuery RWD Image Maps Allows image maps to be used in a responsive design by recalculating the area coordinates to match the actual image size on load and window.resize Usage:•If possible, add correct, unitless width and height attributes to your image map images. You can override these in CSS .. 더보기

반응형