Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

the jquerymobile tabs widget load twice by ajax #8591

Open
riniky opened this issue Sep 24, 2017 · 0 comments
Open

the jquerymobile tabs widget load twice by ajax #8591

riniky opened this issue Sep 24, 2017 · 0 comments

Comments

@riniky
Copy link

riniky commented Sep 24, 2017

I made a simple test on jquerymobile tabs, but it loads twice, here is content:

Page 1:

<!DOCTYPE html><html><head>
<link rel='stylesheet' href='theme-classic.css'/>
<script src='jquery-2.1.4.min.js'></script>
<script src='jquery.mobile-1.4.5.min.js'></script>
</head><body><div data-role="page"><div data-role="content">

<a href="a2.asp">test</a>

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

Page 2:

<!DOCTYPE html><html><head>
<link rel='stylesheet' href='theme-classic.css'/>
<script src='jquery-2.1.4.min.js'></script>
<script src='jquery.mobile-1.4.5.min.js'></script>
</head><body><div data-role="page"><div data-role="content">

<div data-role="tabs">
<div data-role="navbar"><ul>
<li><a href="#A" class="ui-link ui-btn ui-tabs-anchor ui-btn-active">A</a></li>
<li><a href="#B" class="ui-link ui-btn ui-tabs-anchor">B</a></li>
</ul></div>
<div id="A" class="ui-body-d ui-content">A</div>
<div id="B" class="ui-body-d ui-content">B</div>
</div>

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

=======================================

if i visit page 2 directly, or visit without ajax, it works fine...

but if i visit page 2 from the link in page 1 (the page 2 will be open in a ajax way), I will see two times ajax request (F12 developer tool in Chrome), and the page 2 will not display correctly.

any clue, please?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant