본문 바로가기

JQuery-js-css

웹, 모바일 접속 브라우저 구분 var mobile_filter_ = "win16|win32|win64|mac|macintel"; if ( navigator.platform ) { if ( mobile_filter_.indexOf( navigator.platform.toLowerCase() ) < 0 ) { //mobile // do something} else { //pc // do something} }
[파일업로드] upload.html5.js ---------- 파일업로드 하는 페이지에서 jquery.form.js와 upload.html5 js, css 를 불러오기 ---------- -------------- 파일 업로드 html DIV기본형태 -------------------- 전송 ------------------- input[file] 버튼에 걸어준다. ---------------------------- $(document).ready(function(){ $('#file_uploadbtn').uploadHtml5({ 'auto' : false, //'formData' : { 'key' : 'text' }, 'fileType' : 'jpg,jpeg,png,gif,bmp', 'fileSizeLimit' : 8000*1024, // KB..
IScroll 5 - GitHub - document - link iScroll, smooth scrolling for the webiScroll is a high performance, small footprint, dependency free, multi-platform javascript scroller.It works on desktop, mobile and smart TV. It has been vigorously optimized for performance and size so to offer the smoothest result on modern and old devices alike.iScroll does not just scroll. It can handle any element that needs to be moved with user interac..
Flavr 함수 alert함수new $.flavr({content : text,autoclose : true,timeout : 800 /* Default timeout is 3 seconds */,animateEntrance : 'tada'}); confirm 함수 new $.flavr().confirm( '메세지' , function(){goInsert();}, function(){});
[jBox] Options You can set the options for your jBoxes right away or as a second argument when you are using a type:var options = { title: 'My title', content: 'My content' }; new jBox(options); new jBox('Tooltip', options);There are following types: Tooltip, Mouse, Modal, Confirm,Notice, Image. IDidChoose a unique id, otherwise jBox will set one for you (jBoxID1, jBoxID2, ...)Dimensionswidth heightWidth and h..
[JQuery] map 으로 join하는 함수 - 일렬화 $(선택자).map(function(){ return $(this).val(); }).get().join(','); 응용var temp_cnt1 = 0;var join_val = $(선택자).map(function(){if($(this).html()==""){return 0;}else{temp_cnt1 += parseInt($(this).html());} return $(this).html(); }).get(); ex) 결과 값join_val = 0,11,22,33,44,12,16....temp_cnt1 = 138
(box_img) 가로세로 길이 상관없이 부모박스(사이즈 고정)에 이미지 사이즈 조절 태그를 이용하지 않고 박스의 백그라운드로 이용한다. 이 경우 크기에 상관없이 이미지가 자동으로 Box를 채우게 된다. [Html]를 넣지 않는다. [CSS].box_img_wrap{ // 예시 width : 300px; height: 200px;border: 1px solid #d2d2d2;} .box_img_wrap{background-color : #ddd;background-position : center;background-repeat : no-repeat;background-size : cover; ( cover는 여백없이 이미지의 가로 or 세로를 100%로 맞춘다.)background-size : contain; ( contain은 박스의 크기 안에서 이미지 비율 그대로 100% 보여준다. ..
daumOpen에디터 다중처리 안녕하세요 :)3개 이상의 에디터도 2개를 쓸때와 마찬가지 방법으로 사용가능합니다.3번째 에디터용 html을 넣음id값을 중복되지 않게 설정설정한 id값에 맞추어 3번째 에디터용 config값을 설정2번째 에디터가 IFRAME_LOAD_COMPLETE가 되면 3번째 에디터를 생성 var config4 = { txHost: '', txPath: '', txService: 'sample', txProject: 'sample', initializedId: "4", /* 다른 editor와 구분 */ wrapper: "tx_trex_container4", /* 에디터를 둘러싸고 있는 레이어 이름(에디터 컨테이너) */ form: "tx_editor_form4"+"", /* 등록하기 위한 Form 이름 */ tx..