[jQueryPlugin] jQuery Alert Dialogs (Alert, Confirm, & Prompt 대화상자)

11-11-14 17:34

제스프레소 사진 제스프레소조회수 : 1268

Link #1 : http://abeautifulsite.net/blog/2008/12/jquery-alert-dialogs


jQuery 기반의 알림(alert),확인(confirm),프롬프트(prompt) 대화상자 입니다.


설정

 <head> 태그 사이에 아래 코드를 삽입합니다.


<script src="/path/to/jquery.js" type="text/javascript"></script>
<script src="/path/to/jquery.ui.draggable.js" type="text/javascript"></script>
<!-- Core files -->
<script src="/path/to/jquery.alerts.js" type="text/javascript"></script>
<link href="/path/to/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />


jquery ui draggable(ui Core)를 포함하고 있을때에는  jquery.ui.draggable.js 삽입을 빼주세요

IE에서 대화상자를 제대로 표시하기 위해서는 표준모드 DTD선언이 되어야 합니다.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


사용법

  • jAlert(message, [title, callback])
  • jConfirm(message, [title, callback])
  • jPrompt(message, [value, title, callback])

메세지 매개변수에 HTML을 사용할 수 있습니다, 줄바꿈을 지정하려면  \n 또는  <br />을 사용하시면 됩니다.

이 메소드는 confrim()과 prompt()의 같은 값을 리턴하지 않습니다.
콜백함수를 이용하여 결과값을 리턴받아야 합니다.

 

브라우저 지원현황

  • Internet Explorer 6 & 7
  • Firefox 2 & 3
  • Safari 3
  • Chrome
  • Opera 9



데모

라이브 데모 페이지 에서 샘플을 확인하세요.

 

다운로드

현재 버전 : jQuery Alert Dialogs – Version 1.1


 


태그(Tag) : alert, jQuery, plugin, prompt, confirm, 대화상자


댓글 (0)


다음글  jQuery LiveTwitter
이전글  jQuery 1.7에 추가된 $.Callbacks 가이드