
Originally Posted by
simon1066
Thanks, I tried defining $info, but the problem with that (and I think your code as it stands) is that on selecting a tab it strips out the URL path and replaces it with #horizontalTab1/2/3, which is no good if the page is refreshed.
OK.. using the script as designed works outside of ZC, but for some reason not within.. $info was used to display wording after a tab was selected... not used here. removing caused the page history to change, thus the page refreshed issues. Within the easy tab script I comment out the script that was modifying the page history and all works again. I haven't really look deep into why it's changing page history, I don't think we need it unless using easy tabs for a product or catalog listing.
I changed tpl_modules_product_discription.php
Code:
$(document).ready(function () {
$('#horizontalTab').easyResponsiveTabs({
type: 'default', //Types: default, vertical, accordion
width: 'auto', //auto or any width like 600px
fit: true, // 100% fit in a container
activate: function(event) { }
});
$('#verticalTab').easyResponsiveTabs({
type: 'vertical',
width: 'auto',
fit: true
});
});
commented out in easyResponsiveTabs.js lines 142-159
Code:
//Update Browser History
/* if(historyApi) {
var currentHash = window.location.hash;
var newHash = respTabsId+(parseInt($tabAria.substring(9),10)+1).toString();
if (currentHash!="") {
var re = new RegExp(respTabsId+"[0-9]+");
if (currentHash.match(re)!=null) {
newHash = currentHash.replace(re,newHash);
}
else {
newHash = currentHash+"|"+newHash;
}
}
else {
newHash = '#'+newHash;
}
history.replaceState(null,null,newHash);
} */
See if that works for you..
Bookmarks