반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형
Other methods and properties


$.mobile.changePage () 이외에 jQuery Mobile은 추가적인 메소드와 프로퍼티들을 제공합니다. 이것도 $.mobile object에  set 됩니다.


Methods defined on the $.mobile object


Method / Property

Signification

showPageLoadingMsg ()

Method to display a waiting message indicating a page is loading. The message is defined in $.mobile.loadingMessage string ("loading" by default).

hidePageLoadingMsg ()

Method to hide the waiting message previously shown by showPageLoadingMsg ().

activePage

Property representing the jQuery class object for the window currently displayed on the screen.

firstPage

Property representing the jQuery class object corresponding to the first window described in the HTML page (which will normally be displayed first).

pageContainer

Property representing the jQuery class object corresponding to the element in which the windows are inserted. By default the parent element of the first window, corresponding generally to the <body> element. Note that jQuery Mobile assigns the ui-mobile-viewport CSS class to this element.
The value of this property can be changed only during processing of the $ (document).ready () event or after it. New displayed windows will then be inserted in this element.


현재 active window의 HTML content 를 알기 위해 $.mobile.activePage property 를 사용합니다. 우리는 alert 안에 이 content를 display 하는 window에 link를 insert 합니다.


View HTML content of the active window


<!DOCTYPE html>

<html> 

<head> 

  <meta name=viewport content="user-scalable=no,width=device-width" />

  <link rel=stylesheet href=jquery.mobile/jquery.mobile.css />

  <script src=jquery.js></script>

  <script src=jquery.mobile/jquery.mobile.js></script>

</head> 


<body> 


<div data-role=page id=home>

  <div data-role=header>

    <h1>Home</h1>

  </div>


  <div data-role=content>

    <p> Window content </p>  

    <a href=# id=link1> View the contents of the active window </a>

  </div>

</div>


</body>

</html>


<script>


$("#link1").bind ("click", function (event)

{

  alert ($.mobile.activePage.html ());

});




tistory412_01.html





반응형