"> $(function() { var $uid = $('#'); $uid.css({ position:'fixed', right:'50px', bottom:'50px', zIndex:'999999' }).hide().find('>img').css({ cursor:'pointer' }).click(function() { scrollTo(0, 0); }); $(window).scroll(function() { var y = $(window).scrollTop(); if (y > 300 && $uid.is(':hidden')) $uid.fade..
function beep(wavFile){ wavFile = wavFile || "beep.wav" if (navigator.appName == 'Microsoft Internet Explorer') { var e = document.createElement('BGSOUND'); e.src = wavFile; e.loop =1; document.body.appendChild(e); document.body.removeChild(e); } else { var e = document.createElement('AUDIO'); var src1 = document.createElement('SOURCE'); src1.type= 'audio/wav'; src1.src= wavFile; e.appendChild(s..
$('body').on('focus', '[contenteditable]', function() { var $this = $(this); $this.data('before', $this.html()); return $this; }).on('blur', '[contenteditable]', function() { var $this = $(this); if ($this.data('before') !== $this.html()) { $this.data('before', $this.html()); $this.trigger('change'); } return $this; }); $("div.div_memo").on("change", function() { alert($(this).html()); });
js 파일(jquery.cookie.js) 임포트 한 후 쿠키 생성 1. 세션 쿠키(Session Cookie) 세션 쿠키는 브라우저 열려있는 동안만 유지된다 $.cookie('key' , 'value'); 2. 만료일 지정한 쿠키 $.cookie('key' , 'value', { expires : 값 }); 값의 단위는 일(日)단위 이다 주의할 점은 위 생성방식 모두 디폴트로 쿠키가 만들어진 페이지 경로에만 쿠키가 적용된다 모든 페이지에 쿠키를 적용하려면 아래와 같이 path : '/' 를 설정 해야 한다 $.cookie('key' , 'value', { expires : 값, path : '/' }); $.cookie('key' , 'value', { path : '/' }); 쿠키 읽기 $.cook..