본문 바로가기

반응형

Story/Jquery

jquery 배열 형태의 id 값 사용하기 jquery 를 사용할때 id 값이 배열 형태일때 selector id 값을 그대로 사용하면 지정이 안된다 그럴때 역슬래쉬를 두번 감싸서 사용하거나 You have to escape the brackets with \\$("#info\\[text1\\]") 정규식을 사용한 다음과 같은 방법을 이용하면 된다. Try it this way.$('input[id="info[text1]"]') 출처 : http://stackoverflow.com/questions/12973281/how-to-selector-id-textbox-array-using-jquery 더보기
jquery chart jQuery Visualize Plugin jQuery Visualize Plugin is the perfect plugin if you have a table and want to generate a chart out of it. It offers different types of charts such as Bar, Area, Pie & Line charts. Examples Type of Charts: Bar, Area, Pie & Line. Requirements: jQuery, excanvas (included) Browser Support: IE6*, IE7*, IE8*, Firefox 2, Firefox 3.5, Safari 3 and 4, Opera 9. * HTML 5 canvas elem.. 더보기
jQuery Marquee 출처 http://www.jqueryscript.net/demo/Text-Scrolling-Plugin-for-jQuery-Marquee/ jQuery Marquee download Events beforeStarting: Event will be fired on the element before animation starts. finished: Event will be fired on the element after the animation finishes. pause: Fire/trigger this event on the element when you want to pause the animation, for example when you click/hover a link. paused: Event.. 더보기
이미지맵 image map 확인 이미지맵이 걸려있는 경우 영역을 확인하기 힘들때가 있다. 또는 해당 영역을 스타일을 주고 싶을때도 있다. 이런 경우 확인 하는 방법이 있다. 출처 : http://davidlynch.org/projects/maphilight/docs/demo_simple.html 방법 이렇게 하면 mouse over 시 maphilight 에 있는 스타일이 영역에 적용되어 보인다. 더보기
Multi-line Text Overflow Ellipsis 출처 : http://dotdotdot.frebsite.nl/ 글이 길어지면 ... 으로 줄이는대 한 줄 일때는 overflow: hidden; white-space: nowrap; text-overflow: ellipsis; 등을 사용하여 표현이 가능한대 여러 줄 일경우에는 표현이 힘들어 진다. 구굴링으로 찾아보았는대 css 로 처리하는것도 있고 jquery 로 처리하는것도 있는대 jquery 로 처리하는게 가장 간단해 보였다. 사용방법은 jQuery.dotdotdot Advanced cross-browser ellipsis for multiple line content. Demo's and documentation: dotdotdot.frebsite.nl Text only: before: Lorem .. 더보기
javascript 이용 flash param 값 변경 Replace value of object param with Greasemonkey $('#flashc param[name="allowFullScreen"]').val ("true"); var jNewFlash = $('#flashc').clone (true); $('#flashc').replaceWith (jNewFlash) 출처 http://stackoverflow.com/questions/4473739/replace-value-of-object-param-with-greasemonkey 더보기
Jquery 를 이용하여 HTML5 placeholder 를 적용시키기 HTML5 의 Placeholder 를 지원하는 브라우저 Browsers Placeholder Support IE 9 이하 X Firefox 3.7 + ✓ Safari 4.0 + ✓ Chrome 4.0 + ✓ Opera 11 ✓ 출처 : http://www.simpleeditions.com/34001/placeholder-in-html5 With HTML5, you can let browsers give text input boxes a pre-filled value that serves as a hint for the user regarding what to type. When they start typing, the pre-filled value is replaced. You've probably s.. 더보기
이미지 확대 효과 (돋보기 효과) JQZoom 이미지 확대 효과 (돋보기 효과) JQZoom http://www.mind-projects.it/projects/jqzoom/demos.php Add first the last jQuery release, then the jQZoom script(don't forget this),the correct order is important.Look at the installation code below. Add jqzoom.css to your header. How to use Using jQZoom is easy,but you need to specify the HTML anchor element,that is going to generate the zoom revealing a portion of the .. 더보기
Regex Selector for jQuery Regex Selector for jQuery :regex jQuery.expr[':'].regex = function(elem, index, match) { var matchParams = match[3].split(','), validLabels = /^(data|css):/, attr = { method: matchParams[0].match(validLabels) ? matchParams[0].split(':')[0] : 'attr', property: matchParams.shift().replace(validLabels,'') }, regexFlags = 'ig', regex = new RegExp(matchParams.join('').replace(/^\s+|\s+$/g,''), regexF.. 더보기
Basic JQuery Selector 컨트롤할 HTML태그를 셀렉터(Selector)로 지정할 수 있다. $(function(){ $(“셀렉터“).jQuery 명령 }); 1. CSS 셀렉터들 1.1 태그셀렉터 예] ‘목록태그의 css 컬러 속성값을 블루로 바꿔라’ $(function(){ $(“li“).css(“color“,”blue“); }); 1.2 ID셀렉터, Class(클래스)셀렉터 예] ‘목록태그중 id=”first”인 요소를 찾아 css컬러 속성값을 블루로 바꿔라’ $(function(){ $(“li#first“).css(“color“,”blue“); }); 예] ‘목록태그중 class=”first”인 요소를 찾아 css컬러 속성값을 블루로 바꿔라’ $(function(){ $(“li.first“).css(“color“,”blu.. 더보기

반응형