I'm using Foundation 6. I have a select that when you select something it loads the info on the right of it. Everything loads as expected. The problem being that the tabs don't switch. Everything is loaded correctly but it just doesn't tab over. Here is an example.
function showUser(str) {
if (str == "") {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
}
};
xmlhttp.open("GET","getuser.php?q="+str,true);
xmlhttp.send();
}
}
php page-
<div>content</div>
<div>content</div>
<ul class="tabs" data-tabs id="example-tabs">
<li class="tabs-title is-active"><a href="#panel4" aria-selected="true">Info</a></li>
<li class="tabs-title"><a href="#panel1">2013</a></li>
<li class="tabs-title"><a href="#panel2">2014</a></li>
<li class="tabs-title"><a href="#panel3">2015</a></li>
</ul>
<div class="tabs-content" data-tabs-content="example-tabs">
<div class="tabs-panel" id="panel1">
STUFF
</div>
<div class="tabs-panel" id="panel2">
STUFF
</div>
<div class="tabs-panel" id="panel3">
STUFF
</div>
<div class="tabs-panel is-active" id="panel4">
STUFF
</div>
</div>
Main page -
<div class="large-10 columns" id="txtHint">
</div>
They just don't seem to load even though the ids are loaded correctly.