I am getting an error after using disable() on tabs. After having used disable() whenever I hit one of the tabs I get:
Uncaught Error: jQuery UI Tabs: Mismatching fragment identifier.
on the log (in Chromium). There is no apparent malfunction, though; tab swiching works as expected.
I wonder if I am doing something wrong or this is a bug in jQuery Mobile.
See sample:
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<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.3.min.js"></script>
<script
src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script>
$(document).ready(function() {
var disabledTabs = [ 1 ];
$('#navbar').tabs({disabled: disabledTabs});
});
</script>
</head>
<body>
<div data-role="tabs" id="tabs">
<div id="navbar" data-role="navbar">
<ul>
<li><a href="#one" data-ajax="false">one</a></li>
<li><a href="#two" data-ajax="false">two</a></li>
<li><a href="#three" data-ajax="false">three</a></li>
</ul>
</div>
<div id="one" class="ui-body-d ui-content">First</div>
<div id="two" class="ui-body-d ui-content">Second</div>
<div id="three" class="ui-body-d ui-content">Third</div>
</div>
</html>
</body>
Thanks in advance
Your data
<div>should be inside mainnavbardiv as follows:Because of this you get such exception. Just correct the HTML and the code should work properly.