mobileinit 이벤트
설명 : jQuery Mobile의로드가 완료되었음을 나타내는 이벤트입니다.
jQuery ( ".selector") .on ( "mobileinit", function (event) {...})
이 이벤트는 jQuery Mobile의 로딩이 끝난 후 시작 페이지가 강조되기 전에 트리거됩니다. 따라서이 이벤트의 핸들러는 jQuery Mobile의 글로벌 구성 옵션 과 모든 위젯의 기본 옵션 값이 라이브러리 동작에 영향을 미치기 전에이를 수정할 수있는 기회를 제공합니다.
jQuery Mobile은 라이브러리로드 프로세스의 일부로 트리거되기 때문에 jQuery Mobile을로드하기 전에 핸들러를 mobileinit 이벤트에 연결해야합니다. 이를 달성하는 가장 쉬운 방법은 jQuery를로드 하는 script태그 다음에 jQuery Mobile을로드 script하는 script태그 앞에 태그 를 배치하는 것입니다.
<!doctype html>
<html>
<head>
<title>Example illustrating use of the "mobileinit" event</title>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
// Update configuration to our liking
$( document ).on( "mobileinit", function() {
// We want popups to cover the page behind them with a dark background
$.mobile.popup.prototype.options.overlayTheme = "b";
// Set a namespace for jQuery Mobile data attributes
$.mobile.ns = "jqm-";
});
</script>
<script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-jqm-role="page">
<div data-jqm-role="header">
<h2>jQuery Mobile Example</h2>
</div>
<div data-jqm-role="content">
<div id="the-popup" data-jqm-role="popup" data-jqm-position-to="window">
<p>Example popup.</p>
</div>
<a href="#the-popup" data-jqm-rel="popup" class="ui-btn ui-corner-all ui-shadow">Open Popup</a>
</div>
</div>
</body>
</html>
설명 : jQuery Mobile의로드가 완료되었음을 나타내는 이벤트입니다.
jQuery ( ".selector") .on ( "mobileinit", function (event) {...})
이 이벤트는 jQuery Mobile의 로딩이 끝난 후 시작 페이지가 강조되기 전에 트리거됩니다. 따라서이 이벤트의 핸들러는 jQuery Mobile의 글로벌 구성 옵션 과 모든 위젯의 기본 옵션 값이 라이브러리 동작에 영향을 미치기 전에이를 수정할 수있는 기회를 제공합니다.
jQuery Mobile은 라이브러리로드 프로세스의 일부로 트리거되기 때문에 jQuery Mobile을로드하기 전에 핸들러를 mobileinit 이벤트에 연결해야합니다. 이를 달성하는 가장 쉬운 방법은 jQuery를로드 하는 script태그 다음에 jQuery Mobile을로드 script하는 script태그 앞에 태그 를 배치하는 것입니다.
<!doctype html>
<html>
<head>
<title>Example illustrating use of the "mobileinit" event</title>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script>
// Update configuration to our liking
$( document ).on( "mobileinit", function() {
// We want popups to cover the page behind them with a dark background
$.mobile.popup.prototype.options.overlayTheme = "b";
// Set a namespace for jQuery Mobile data attributes
$.mobile.ns = "jqm-";
});
</script>
<script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-jqm-role="page">
<div data-jqm-role="header">
<h2>jQuery Mobile Example</h2>
</div>
<div data-jqm-role="content">
<div id="the-popup" data-jqm-role="popup" data-jqm-position-to="window">
<p>Example popup.</p>
</div>
<a href="#the-popup" data-jqm-rel="popup" class="ui-btn ui-corner-all ui-shadow">Open Popup</a>
</div>
</div>
</body>
</html>
게시글 목록
| 번호 | 제목 |
|---|---|
| 1326 |
AngularJS
AngularJS Filters에 uppercase (대문자변환)
|
| 1325 |
AngularJS
AngularJS Scope 3
|
| 1324 |
AngularJS
AngularJS Scope 2
|
| 1323 |
AngularJS
AngularJS Scope 1
|
| 1322 | |
| 1321 | |
| 1320 |
AngularJS
AngularJS Controllers
|
| 1319 |
AngularJS
AngularJS Data Binding 2번째
|
| 1318 | |
| 1317 |
AngularJS
AngularJS ng-model Directive
|
| 1316 | |
| 1315 |
AngularJS
AngularJS Directives(지시문) - 데이터 바인딩
|
| 1314 |
AngularJS
AngularJS Directives(지시문)
|
| 1313 |
AngularJS
AngularJS 모듈 만들기
|
| 1312 |
AngularJS
앵큘러js 간단한 예제
|
| 1311 | |
| 1310 |
AngularJS
AngularJS Input Controls - Data-Binding
|
| 1309 |
AngularJS
AngularJS $event Object
|
| 1308 |
AngularJS
AngularJS Toggle, True/False
|
| 1307 |
AngularJS
AngularJS ng-click 지시문
|
| 1306 |
AngularJS
AngularJS 마우스 이벤트
|
| 1305 |
AngularJS
AngularJS 이벤트
|
| 1304 |
jQuery Mobile
scrollstart 이벤트
|
| 1303 |
jQuery Mobile
pageshow 이벤트
|
| 1302 |
jQuery Mobile
pageremove 이벤트
|
| 1301 |
jQuery Mobile
pageloadfailed 이벤트
|
| 1300 |
jQuery Mobile
pageload 이벤트
|
| 1299 |
jQuery Mobile
pageinit 이벤트
|
| 1298 |
jQuery Mobile
pagehide 이벤트
|
| 1297 |
jQuery Mobile
pagecreate
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기