Jquery Mobile Button is not working at Second Click

别说谁变了你拦得住时间么 提交于 2019-12-13 04:19:39

问题


I have a personal project that shows some charts about my losing weight trophy. I created a page with jquery mobile just because I will use this application on my mobile. However I have some problems with jquery mobile and I could not figure it out.PROJECT DEMO

Problem is : When I click circle icon[TOP LEFT] which will trigger the left panel and and click workoutcharts page then please click CIRCLE IVAN DRAGO icon which will redirect you to again Main Page then click TOP LEFT Circle Icon again, then boom, it wont work and I could not figure it out.

I tried it on fiddle and it is working at all

<div data-role="page" id="firstPage">
    <a href="#mypanel" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-notext" ></a>
    <div data-role="panel" id="mypanel" class="menuPanel">
        <ul>
            <li> <a href="#firstPage" >First Page</a></li>
            <li> <a href="#secondPage" >Second Page</a></li>
        </ul>
    </div>
    first Page
</div>

<div data-role="page" id="secondPage">
     <a href="#mypanel" class="ui-btn ui-shadow ui-corner-all ui-btn-icon-notext" ></a>

    <a href="#firstPage">First PAGE</a>
    <div data-role="panel" id="mypanel" class="menuPanel">
        <ul>
            <li> <a href="#firstPage" >First Page</a></li>
            <li> <a href="#secondPage" >Second Page</a></li>
        </ul>
    </div>

    Second Page
</div>

回答1:


I notice that you have two divs, both with the same id "mypanel" -- that might be the cause of your problem



来源:https://stackoverflow.com/questions/24972261/jquery-mobile-button-is-not-working-at-second-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!