전체 글(97)
-
JQuery 를 사용한 무한 스크롤 (Infinite Scroll) 예제
var page = 1; $(window).scroll(function() { if ($(window).scrollTop() == $(document).height() - $(window).height()) { console.log(++page); $("#enters").append("Page " + page + " So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ So MANY BRS YEAHHH~ ..
2018.04.17 -
Auto tab to next input field when fill 4 characters
https://stackoverflow.com/questions/23888537/auto-tab-to-next-input-field-when-fill-4-characters
2018.04.13 -
[jQuery] 확인 창(confirm), 페이지 이동(location.replace)
$(document).ready(function(){ $('#Btn').click(function() { var result = confirm('Are you sure you want to do this?'); if(result) { //yes location.replace('index.php'); } else { //no } }); }); 출처: http://88240.tistory.com/173 [shaking blog]
2018.04.13 -
POST 전송 (jQuery), POST 이동, POST 새창
>> POST 전송, 결과값 리턴 (jQuery) function post_s(href, parm, del) { if (!del || confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) { $.post(href, parm, function(req) { document\.write(req); }); } } // 예제... onclick="post_s('경로', {'parm1':'val1','parm2':'val2'}, true);" ...리턴값으로 document.location.replace('경로'); 등이 오면 되겠다. 3번째 요소는 삭제명령을 위한 것. >> POST 이동 function post_goto(url, parm, target) { var f =..
2018.04.13 -
jquery POST 방식으로 다른 페이지로 이동하는 방법
리스트보기 $(document).ready(function(){ $("#btnList").click(function(){var form = document.createElement('form');var objs;objs = document.createElement('input');objs.setAttribute('type', 'hidden');objs.setAttribute('name', 'name');objs.setAttribute('value', value);form.appendChild(objs);form.setAttribute('method', 'post');form.setAttribute('action', "/action.php");document.body.appendChild(form);for..
2018.04.13 -
자동 로그아웃
function is_user() { $idletime=600; // after 600 seconds the user gets logged out if (time()-$_SESSION['timestamp']>$idletime){ session_destroy(); session_unset(); }else{ $_SESSION['timestamp']=time(); } if (isset($_SESSION['username'])) return true; } 로그인 로직에 추가$_SESSION['timestamp']=time();
2018.04.12