본문 바로가기

Python_WEB/JavaScript

[Ch16]모바일 웹 페이지 연습문제 5

반응형

Q>

텍스트를 클릭하면 사라지는 웹 페이지를 jQuery Mobile로 작성해 본다.

 

A>

<!DOCTYPE html>
<html lang="ko">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jQuery Mobile Quiz 5</title>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
    <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>

<body>
    <div data-role="page">
        <div data-role="content">
            <p>클릭하면 사라집니다.</p>
            <p>클릭하면 사라집니다.</p>
            <p>클릭하면 사라집니다.</p>
        </div>
    </div>

    <script>
        $("p").click(function () {
            $(this).hide();
            return true;
        });    
    </script>
</body>

</html>

 

R>

 

HTML5 + CSS3 + JavaScript로 배우는 웹프로그래밍 기초
국내도서
저자 : 천인국
출판 : 인피니티북스 2013.12.19
상세보기
반응형