jQuery 38

javascript jQuery popup, lightbox - magnific popup

매우 좋은 팝업 플러그인 http://dimsemenov.com/plugins/magnific-popup/ Magnific Popup is a responsive lightbox & dialog script with focus on performance and providing best experience for user with any device (for jQuery or Zepto.js).Documentation · GitHub · WordPress plugin · Build tool · How it was made /**youtube video popup**/ $('.modal-video').magnificPopup({ type: 'iframe' }); $(document).ready(functi..

프로그램/script 2018.04.17

jQuery plugin 개발용 템플릿

jQuery plugin개발을 위한 손쉬운 방법이 있어 공유 합니다. 아래와 같은 형태로 작업을 하면 기존의 방법보다 훨씬 편한것 같습니다. 아래 부분이 키포인트 같아서 발춰해봅니다. $.fn[pluginName] = function(options) { // Iterate through each DOM element and return it return this.each(function() { // prevent multiple instantiations if (!$.data(this, 'plugin_' + pluginName)) { $.data(this, 'plugin_' + pluginName, new Plugin(this, options)); } }); }; Plugin의 접근을 $(p1).data..

프로그램/script 2015.09.24

jQuery Ajax json Post

data post를 http body에 직접 하는 방법이 있다... 흔히 json post라고 하는데, 아래와 같이 처리 하면 된다. Ajax Post Json Example)Client Side) $.ajax({ url: '', type: 'post', accept: 'application/json', contentType: 'application/json; charset=utf-8', data: JSON.stringify({'list': savedData}), dataType: 'json', success: function(data) { // success handle }, error: function(jqXHR,textStatus,errorThrown) { // fail handle } }); Se..

프로그램/spring 2014.02.19

jQuery Select , Option Example

Query select 선택 값 확인하기 : from http://lanian.tistory.com/356 from 분류없음 jQuery로 선택된 값 읽기 $("#select_box option:selected").val(); $("select[name=name]").val(); jQuery로 선택된 내용 읽기 $("#select_box option:selected").text(); 선택된 위치 var index = $("#test option").index($("#test option:selected")); ------------------------------------------------------------------- // Add options to the end of a select $("#..

프로그램/jQuery 2014.02.19

jQuery utility and tip

jQuery를 이용한 손쉬운 유틸리티 모음을 공유 합니다. 출처는 trac 입니다. (function($){ if (typeof _ == 'undefined') babel.Translations.load({}).install(); $.fn.addAnchor = function(title) { title = title || _("Link here"); return this.filter("*[id]").each(function() { $(" \u00B6").attr("href", "#" + this.id) .attr("title", title).appendTo(this); }); } $.fn.checked = function(checked) { if (checked == undefined) { // gett..

프로그램/jQuery 2013.04.23