Jquery mobile 当用户单击页面中的任意位置时,如何显示和隐藏标题?

Jquery mobile 当用户单击页面中的任意位置时,如何显示和隐藏标题?,jquery-mobile,Jquery Mobile,你们能告诉我当用户点击页面的任何地方时如何显示和隐藏标题吗? 我想我需要使用切换类和('.header').show('slow')或隐藏。我不知道如何使用它? 添加图像 这是基本标题。但我需要实现有多个图像水平滚动的标题。 如何在jquery mobile中水平滚动图像?只需将这些属性添加到标题中:数据位置=“固定”和数据全屏=“true” 工作示例: HTML: <!DOCTYPE html> <html> <head> &l

你们能告诉我当用户点击页面的任何地方时如何显示和隐藏标题吗? 我想我需要使用切换类和('.header').show('slow')或隐藏。我不知道如何使用它?


添加图像
这是基本标题。但我需要实现有多个图像水平滚动的标题。
如何在jquery mobile中水平滚动图像?

只需将这些属性添加到标题中:
数据位置=“固定”
数据全屏=“true”

工作示例:

HTML:

<!DOCTYPE html>
<html>
    <head>
        <title>jQM Complex Demo</title>
        <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi"/>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
        <!--<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>-->
        <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>    
    </head>
    <body>
        <div data-role="page" id="index">
            <div data-theme="b" data-role="header" data-position="fixed" data-fullscreen="true">
                <h1>Index page</h1>
                <a href="#second" class="ui-btn-right" data-icon="edit">Next</a>
            </div>

            <div data-role="content">

            </div>
        </div>    
    </body>
</html>   

jQM复杂演示
索引页

还有一个问题是,我需要在页眉上添加滚动图像。交换图像。我可以在其中使用iscroller吗?
<!DOCTYPE html>
<html>
    <head>
        <title>jQM Complex Demo</title>
        <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi"/>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
        <!--<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>-->
        <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>    
    </head>
    <body>
        <div data-role="page" id="index">
            <div data-theme="b" data-role="header" data-position="fixed" data-fullscreen="true">
                <h1>Index page</h1>
                <a href="#second" class="ui-btn-right" data-icon="edit">Next</a>
            </div>

            <div data-role="content">

            </div>
        </div>    
    </body>
</html>