Jquery mobile 如何在面板中显示带有按钮的面板?

Jquery mobile 如何在面板中显示带有按钮的面板?,jquery-mobile,Jquery Mobile,您能告诉我如何在面板中显示带有按钮的面板(带幻灯片放映)。并在每个按钮点击时显示不同的页面吗 这是我的密码。 首页 开口板 我希望我正确理解了你的问题 工作示例: HTML: <div data-role="page" id="index"> <div data-role="panel" id="mypanel"> <a href="#second" data-role="button">Jump to second page&

您能告诉我如何在面板中显示带有按钮的面板(带幻灯片放映)。并在每个按钮点击时显示不同的页面吗

这是我的密码。


首页
开口板

我希望我正确理解了你的问题

工作示例:

HTML:

<div data-role="page" id="index">  
    <div data-role="panel" id="mypanel">
        <a href="#second" data-role="button">Jump to second page</a>
        <a href="#third" data-role="button">Jump to third page</a>        
    </div>

    <div data-theme="a" data-role="header">
        <h3>
            First Page
        </h3>
        <a href="#second" class="ui-btn-right">Next</a>
    </div>

    <div data-role="content">
        <a data-role="button" id="open-panel">Open Pannel</a>
    </div>

    <div data-theme="a" data-role="footer" data-position="fixed">

    </div>
</div> 
<div data-role="page" id="second">
    <div data-role="panel" id="mypanel">
        <a href="#index" data-role="button">Jump to first page</a>
        <a href="#third" data-role="button">Jump to third page</a>        
    </div>    

    <div data-theme="a" data-role="header">
        <h3>
            Second Page
        </h3>
        <a href="#index" class="ui-btn-left">Back</a>
    </div>

    <div data-role="content">
        <a data-role="button" id="open-panel">Open Pannel</a>
    </div>

    <div data-theme="a" data-role="footer" data-position="fixed">

    </div>
</div>
<div data-role="page" id="third">
    <div data-role="panel" id="mypanel">
        <a href="#index" data-role="button">Jump to first page</a>
        <a href="#second" data-role="button">Jump to second page</a>        
    </div>    

    <div data-theme="a" data-role="header">
        <h3>
            Third Page
        </h3>
        <a href="#index" class="ui-btn-left">Back</a>
    </div>

    <div data-role="content">
        <a data-role="button" id="open-panel">Open Pannel</a>
    </div>

    <div data-theme="a" data-role="footer" data-position="fixed">

    </div>
</div> 

我希望我正确理解了你的问题

工作示例:

HTML:

<div data-role="page" id="index">  
    <div data-role="panel" id="mypanel">
        <a href="#second" data-role="button">Jump to second page</a>
        <a href="#third" data-role="button">Jump to third page</a>        
    </div>

    <div data-theme="a" data-role="header">
        <h3>
            First Page
        </h3>
        <a href="#second" class="ui-btn-right">Next</a>
    </div>

    <div data-role="content">
        <a data-role="button" id="open-panel">Open Pannel</a>
    </div>

    <div data-theme="a" data-role="footer" data-position="fixed">

    </div>
</div> 
<div data-role="page" id="second">
    <div data-role="panel" id="mypanel">
        <a href="#index" data-role="button">Jump to first page</a>
        <a href="#third" data-role="button">Jump to third page</a>        
    </div>    

    <div data-theme="a" data-role="header">
        <h3>
            Second Page
        </h3>
        <a href="#index" class="ui-btn-left">Back</a>
    </div>

    <div data-role="content">
        <a data-role="button" id="open-panel">Open Pannel</a>
    </div>

    <div data-theme="a" data-role="footer" data-position="fixed">

    </div>
</div>
<div data-role="page" id="third">
    <div data-role="panel" id="mypanel">
        <a href="#index" data-role="button">Jump to first page</a>
        <a href="#second" data-role="button">Jump to second page</a>        
    </div>    

    <div data-theme="a" data-role="header">
        <h3>
            Third Page
        </h3>
        <a href="#index" class="ui-btn-left">Back</a>
    </div>

    <div data-role="content">
        <a data-role="button" id="open-panel">Open Pannel</a>
    </div>

    <div data-theme="a" data-role="footer" data-position="fixed">

    </div>
</div> 


你的问题不清楚。你想做什么?实际上,我需要在按钮点击上有一个面板。在面板中有多个按钮。在每个按钮点击上,我需要转到不同的页面。面板使用转换时间缓慢显示。删除警报,面板将开始工作。我需要在这个面板上有多个按钮。每个按钮都转到不同的页面。你的问题不清楚。你想做什么?事实上,我需要一个按钮点击面板。在面板中有多个按钮。在每个按钮点击上,我需要转到不同的页面。面板使用转换时间缓慢显示。删除警报,面板将开始工作我需要此面板上的多个按钮。每个按钮都指向不同的页面。您理解的正确率为50%,但错误率为50%。抱歉。当您单击“打开面板”按钮时,它将在页面的30%宽度上显示面板,在同一页面上显示70%宽度的面板(当按钮显示“打开面板”时),单击它显示的第二个按钮和第三个按钮(同页共页)是相同的页面,宽度为70%。面板也在显示。您使用的浏览器是什么?Chrome。实际上,当我单击第二个页面按钮时,它只在同一页面上显示该页面。请告诉我另一个平台,因为它在Windows 7上工作,上一个Chrome版本?您理解50%正确。但50%错误。抱歉,当您单击“打开面板”按钮时,它会在30%的页面宽度上显示面板点击显示的第二个按钮和第三个按钮(同一页面上的页面),页面和同一页面上的70%宽度(当按钮出现在打开的面板上时)是相同的页面,宽度为70%。面板也在显示。您使用的浏览器是什么?Chrome。实际上,当我单击第二个页面按钮时,它只在同一页面上显示该页面。请告诉我另一个平台,因为它在Windows 7上工作,上一个Chrome版本?
$(document).on('click', '#open-panel', function(){   
    $.mobile.activePage.find('#mypanel').panel("open");       
});