[jQuery] smooth scroll to top 페이지 상단으로 부드럽게 이동하기
jQuery('a[href="#top"]').click(function(e){ e.preventDefault(); jQuery('html, body').animate({ scrollTop: 0 },500) }); <a href="#top">Scroll to Top</a> #top ...
jQuery('a[href="#top"]').click(function(e){ e.preventDefault(); jQuery('html, body').animate({ scrollTop: 0 },500) }); <a href="#top">Scroll to Top</a> #top ...
현재 로그인 한 유저의 정보를 불러오는 방법이다. 원문 글 – WordPress Codex Function Reference/wp get current user 예제 $current_user = wp_get_current_user(); /** * @example Safe usage: $cu...
<?php bloginfo('name'); $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { echo ' | '.$site_description; } wp...
글이나 댓글에 달린 주소에 자동으로 링크(a)를 걸어주는 JS 플러그인. ex) http://wallel.com -> http://wallel.com 공식 홈페이지를 접속해보면 어떻게 작동하는지 이해하기 더 쉬우니 참고해볼것. 홈페이지...
// 숫자 타입에서 쓸 수 있도록 format() 함수 추가 Number.prototype.format = function(){ if(this==0) return 0; var reg = /(^[+-]?\d+)(\d{3})/; var n = (this + ''); while (reg.test(n...
간단하게 스크립트를 삽입하는걸로 브라우저 버전을 체크, <html> 에 class 를 추가할 수 있다. 크로스브라우징을 할 때 유용하다. 추가로 공식 홈페이지 내의 스크립트를 사용해 특정 위치에 현재 접속한 ...