alert 대신 jqm의 dialog 를 이용하기 > jquery

본문 바로가기
사이트 내 전체검색

jquery

alert 대신 jqm의 dialog 를 이용하기

페이지 정보

작성자 서방님 댓글 0건 조회 121회 작성일 15-07-09 13:24

본문

뭐 간단한 것일 수 있는데

간단한 것이니 간단히 함수를 만들어 사용 하자는 취지..


function errorDialog(message)

{

$("#errorMsg").html(message);

$.mobile.changePage($("#errorAlert"),{transition:"pop",role:"dialog"});

return;

}


이건 다이얼로그 띄우는 함수 

사용은 앞에 로그인 부분에 있으니 참조


<div data-role="page" id="errorAlert" >

<div data-role="header">

<h1>Error Message</h1>

</div>

<div data-role="content">

<div id="errorMsg"></div>

<a id="alertClose" data-role="button" href="#" data-rel="back">닫기</a>

</div>

</div>


이건 에러 메시지가 출력 되는 창


간단 하죠... 

alert() 로 하면 좋긴 하겠지만, 제목 부분에 도메인 주소가 나와서(안드로이드 기준) 보기 안좋아서...

댓글목록

등록된 댓글이 없습니다.

Total 193건 13 페이지
게시물 검색

회원로그인

접속자집계

오늘
77
어제
84
최대
1,347
전체
154,448
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.