sitelink3 http://1 


page

가장 상위의 컴포넌트로 page를 data-role의 값으로 하고 모든 컴포넌트를 포함한다.

page의 일반적인 구성

아래와 같이 body 태그 하위에 위치하고 header, content, footer와 같은 레이아웃과 관련된 컴포넌트들을 자식으로 한다.

1
2
3
4
5
6
7
<body>
    <div data-role="page">
        <div data-role="header">...</div>
        <div data-role="content">...</div>
        <div data-role="footer">...</div>
    </div>
</body>

전체소스

싱글 페이지 템플릿과 멀티 페이지 템플릿

page가 하나의 웹페이지에 여러개 등장하면 멀티 페이지 템플릿이라고 부르고, 이에 상대적으로 하나의 페이지만 있는 문서를 싱글 페이지 템플릿이라고 부른다.

멀티 페이지 템플릿의 엘리먼트는 id값을 가지고 있어야 하는데, 이 값은 페이지를 전환할 때 아래와 같이 사용된다. id 값이 foo인 페이지를 여는 링크의 예

1
<a href="foo">foo</a>

http://jquerymobile.com/demos/1.1.0/docs/pages/multipage-template.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
    <head>
    <title>Page Title</title>
     
    <meta name="viewport" content="width=device-width, initial-scale=1">
 
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
</head>
<body>
 
<!-- Start of first page -->
<div data-role="page" id="foo">
 
    <div data-role="header">
        <h1>Foo</h1>
    </div><!-- /header -->
 
    <div data-role="content">    
        <p>I'm first in the source order so I'm shown as the page.</p>        
        <p>View internal page called <a href="#bar">bar</a></p>    
    </div><!-- /content -->
 
    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->
 
 
<!-- Start of second page -->
<div data-role="page" id="bar">
 
    <div data-role="header">
        <h1>Bar</h1>
    </div><!-- /header -->
 
    <div data-role="content">    
        <p>I'm the second in the source order so I'm hidden when the page loads. I'm just shown if a link that references my ID is beeing clicked.</p>        
        <p><a href="#foo">Back to foo</a></p>    
    </div><!-- /content -->
 
    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->
</body>
</html>

참고 : http://jquerymobile.com/demos/1.1.0/docs/pages/page-anatomy.html

dialog

대화상자라는 뜻으로 현재 페이지의 맥락을 유지하면서 새로운 페이지를 열 때 사용한다. 아래 예제는 _dialog.html 을  팝업으로 띄우는 예제다.

dialog.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
    <head>
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
</head>
<body>
<!-- Start of second page -->
<div data-role="page" id="bar">
 
    <div data-role="header">
        <h1>Bar</h1>
    </div><!-- /header -->
 
    <div data-role="content">
        <a href="_dialog.html" data-rel="dialog">Open dialog</a>
    </div><!-- /content -->
 
    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->
</body>
</html>

전체소스

_dialog.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html>
    <head>
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
</head>
<body>
<!-- Start of second page -->
<div data-role="page" id="bar">
 
    <div data-role="header">
        <h1>Bar</h1>
    </div><!-- /header -->
 
    <div data-role="content">
            <h1>Delete page?</h1>
            <p>This is a regular page, styled as a dialog. To create a dialog, just link to a normal page and include a transition and <code>data-rel="dialog"</code> attribute.</p>
            <a href="docs-dialogs.html" data-role="button" data-rel="back" data-theme="b">Sounds good</a>       
            <a href="docs-dialogs.html" data-role="button" data-rel="back" data-theme="c">Cancel</a>  
    </div><!-- /content -->
 
    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->
</body>
</html>

전체소스

참고 : http://jquerymobile.com/demos/1.1.0/docs/pages/page-dialogs.html

번호 제목 글쓴이 날짜 조회 수
39 UIScene 지원시 가능해지는 기능 (iOS13 이상) 황제낙엽 2026.02.13 871
38 모바일 디바이스에서 알림을 띄우는 방식 황제낙엽 2023.11.04 713
37 여러대의 맥에서 하나의 앱 개발하기 file 황제낙엽 2022.09.17 860
36 Galaxy Z Fold3 5G Specifications 황제낙엽 2022.03.07 1346
35 cell phone rotate (vertical, horizon, portrait, landscape) 황제낙엽 2021.04.14 1318
34 피들러(Fiddler)를 이용하여 모바일 네트웍 감시 file 황제낙엽 2020.02.24 1822
33 UIWebView, WKWebView 황제낙엽 2019.11.01 882
32 모바일웹 SMS 황제낙엽 2019.09.28 1141
31 안드로이드 모바일 브라우저 캐시 지우기 황제낙엽 2019.07.23 1163
30 AsyncTask 황제낙엽 2019.03.25 619
29 [모바일 브라우저] Android 기기 원격 디버깅 시작하기 (PC크롬에서 모바일크롬 디버깅) file 황제낙엽 2019.01.14 1250
28 TTS 이용하기 (구글, 네이버, KT) file 황제낙엽 2018.11.01 1806
27 음성합성(이하 TTS)관련 사양조사 및 시장조사 file 황제낙엽 2018.11.01 1101
26 Canvas & Paint file 황제낙엽 2018.07.24 608
25 Bluetooth Connection을 사용하는 멀티플랫폼 앱 개발기 황제낙엽 2018.06.25 1461
24 원격 데스크톱 환경을 위한 터치에 대한 제스쳐 목록 정의 황제낙엽 2018.06.12 1698
23 팬(Pan), 스와이프(Swipe), 스크롤(Scroll), 플릭(Flick) file 황제낙엽 2017.09.11 1720
22 Swift 와 Kotlin 황제낙엽 2017.07.29 1038
21 위치정보(GeoLocation)에서 위도와 경도로 두 지점간 거리(distance) 구하는 오라클 Function 황제낙엽 2017.01.25 1268
20 [Mysql] 위도 경도를 이용해 특정 거리안에 위치(거리) 구하기 황제낙엽 2017.01.25 1444