우선 http://www.decorplanit.com/plugin/ 에서 autoNumeric 플러그인을 다운 받는다
다운로드 경로 :: https://github.com/BobKnothe/autoNumeric
적용하고자 하는 객체의 id 에 autoNumeric 을 적용한다
ex)
$(function(){
$('#wr_person').autoNumeric('init');
});
wr_person 객체에는 제한 값을 줘야한다
제한 값을 주지 않으면 numeric 적용시 소수점으로만 나오는데
data-v-min, data-v-max 속성을 주면 된다
ex)
<input name="wr_person" type="text" id="wr_person" data-v-min="0" data-v-max="10000000000" value=""/>
data-v-min 은 최소값 이며, data-v-max 는 최대값이다
적용솔루션 :: 넷퓨 알바 솔루션 (http://alba.netfu.co.kr), 펜션실시간예약 (http://time.netfu.co.kr/n_time/)
데모는 넷퓨 홈페이지 (http://netfu.co.kr) 에서 확인가능합니다.
'Programming > jQuery' 카테고리의 다른 글
radio 컨트롤 (0) | 2015.01.09 |
---|