본문 바로가기

js

(48)
[javascript] replace 에서 | or \| 차이 var dataText = '12345|678910|asdfg'; var convertedText1 = dataText.replace(/|/g,"#"); var convertedText2 = dataText.replace(/\|/g,"#"); alert('convertedText1 : ' + convertedText1 + ' - convertedText2 : ' + convertedText2); demo : https://jsfiddle.net/dv88jbkb/
[javascript] guid 만들기 html 생성 css #guid { width:500px; } javascript var _guid = {}; _guid.get = function() { return _guid.s4() + _guid.s4() + _guid.s4() + _guid.s4() + _guid.s4() + _guid.s4() + _guid.s4() + _guid.s4(); } _guid.s4 = function() { return Math.floor((1 + Math.random()) * 0x10000) .toString(16) .substring(1); } $('#btn_create').on('click', function(){ $('#guid').val(_guid.get()); }); demo : jsfiddle link
[node.js] grunt build after ESLint : ERROR consistent-this var C = this; -> var C; C = this; 참조 : https://goo.gl/qubw6z
[node.js] cannot find module 'express' git clone 후 npm init, npm install 후에 node.js 앱 실행 시 모듈을 못 찾을 때 프로젝트 폴더에서 실행한다. express 가 이미 install 되어 있으면 npm link 만 실행해도 됩니다. ubuntu 16.X sudo npm install -g express sudo npm link express
[javascript] replace all 할 때 var obj = "무거운 문을 세로측 중심으로 쉽게 회전시키기 위한 개폐 철물이다. 지도리 경첩, 피봇 경첩이라고도 한다." var result = obj.replace(/
[jsonp] Ajax jsonp 사용방법 간단예제 https://goo.gl/kwd7cv 원리 https://goo.gl/gdzhjV core javascript 로 jsonp 예제 https://goo.gl/8gohsw SOP - 동일출처원칙 https://goo.gl/twQQa9 크로스도메인 예제 https://goo.gl/Ynfc5A java 예제 https://goo.gl/zYEUcw https://goo.gl/Dn9UG
[jquery mobile] ListView scroll load more https://goo.gl/2c9XYy jsfiddle http://jsfiddle.net/knuTW/2/ lazy load https://goo.gl/7yAsDT jsfillde http://jsfiddle.net/Palestinian/pAgbT/light/ http://embed.plnkr.co/J4IbE9/ https://codepen.io/Palestinian/pen/ApFDG lazy loader plugin https://goo.gl/WMxVZi git https://github.com/dcarrith/jquery.mobile.lazyloader Masonry plugin https://goo.gl/v652YU 6 type jquery-infinite-scrolling-demos with so..
[jquery mobile] swipe event swipe left / right 는 기본적으로 이벤트 핸들러를 제공하는데 up/down 은 api doc 에 없어서 구현 된 예제를 찾아봤습니다. jquery Mobile https://api.jquerymobile.com/swipe/ jsfiddle https://goo.gl/Nwvhu1 touch swipe - 페이지 하단에 example 들이 있습니다. http://labs.rampinteractive.co.uk/touchSwipe/demos/Page_scrolling.html