Smooth Scroll - 부드러운 스크롤 이동 ( 속도 , 위치 셋팅)

Open API/Jquery|2016. 11. 1. 09:14
반응형


지정위치로 스크롤바를 부드럽게 이동 시켜줍니다.

 

PlugIn Url : http://github.com/kswedberg/jquery-smooth-scroll


샘플 코드 다운로드 :  904.zip




 

 

* 옵션 값

{
  offset: 0,
 
  // one of 'top' or 'left'
  direction: 'top',
 
  // only use if you want to override default behavior
  scrollTarget: null,
 
  // fn(opts) function to be called before scrolling occurs.
  // `this` is the element(s) being scrolled
  beforeScroll: function() {},
 
  // fn(opts) function to be called after scrolling occurs.
  // `this` is the triggering element
  afterScroll: function() {},
  easing: 'swing',
  speed: 400,
 
  // coefficient for "auto" speed
  autoCoefficent: 2
 
}

* 샘플 코드
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />  
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script> 
<script src="/test/904/jquery.smooth-scroll.js"></script> 
<style>
a {
  color: #8ad459;
  text-decoration: none;
} 
</style>
</head>
<script type="text/javascript">
$(document).ready(function($) {
      $('a').smoothScroll({
        speed: 1000,
        easing: 'easeInOutCubic'
      });  
  }); 
</script>  
<body>
<div style="position: fixed; top:50px;background: #fff"> 
<ul style="list-style: none;">
<li></li> 
<li><a href="#Red" >Red</a></li>
<li><a href="#blue">blue</a></li>
<li><a href="#pink">pink</a></li> 
</ul>
</div>
<div>
<div style="background-color:red;height:400px;" id="Red"> </div>
<div style="background-color:blue;height:400px;" id="blue"/> </div>
<div style="background-color:pink;height:400px;" id="pink"/> </div> 
<div style="height:300px;"></div> 
</div>
</body>
</html>


댓글()

lightBox2 - 레이어 팝업

Open API/Jquery|2016. 10. 31. 09:33
반응형



jQuery 를 이용한 litebox2 레이어 팝업 플러그인입니다.


PlugIn & DownLoad URL : http://lokeshdhakar.com/projects/lightbox2/


샘플 소스 파일 :  893.7z


홈페이지 상에도 나와있지만 MIT 라이센스로 


큰 제약 없이 이용 가능한 플러그인 입니다.

댓글()

다음 블로그 검색연동 ( XML , JSON )

Open API/Daum|2016. 10. 31. 09:26
반응형



다음 블로그 검색 결과 XML로 받기


* API Url

 : http://dna.daum.net/apis/search


* Test Url

 : http://apis.daum.net/search/blog?q=uhoon.co.kr&apikey=DAUM_SEARCH_DEMO_APIKEY


* API Key 

 : http://dna.daum.net/myapi/dashboard


기타 검색 및 상세 옵션은 API 를 참고해주시고 블로그 검색을 위한 옵션입니다.



Request Parameter 

 

요청변수 설명
q string (필수) 검색을 원하는 질의어
result integer : 기본값 10, 최소 1, 최대 20 한 페이지에 출력될 결과수
pageno integer : 기본값 1, 최소 1, 최대 500 검색 결과 페이지 번호
sort string : date(기본값), accu
  • 검색 결과의 정렬순서
  • date : 최신글순
  • accu : 정확도순
output string : xml(기본값), json 결과형식
callback string 콜백함수(output이 json일 경우)




Response Parameter


출력 변수 설명
title string 검색 제목
link string 서비스 URL
description string 검색 결과의 간략한 소개
lastBuildDate string 검색 시간
totalCount integer 전체 검색 결과의 수
pageCount integer 전체 검색 결과의 페이지수
result integer 한 페이지에 출력될 결과수
item - 개별 검색 결과 정보
title string 개별 검색 결과의 제목
description string 개발 검색 결과의 본문 요약
link string 개별 검색 결과의 link url
comment string 관련 링크
author string 출처
pubDate string 등록일



댓글()