
Originally Posted by
simon1066
This code is pretty similar to that which I'm using. Not sure if the 'works without errors' was referring to the site in your signature, but I had a quick look at that to compare the html and js code with mine, and found that you do have the Uncaught ReferenceError: $info is not defined error.
Got it... sorry didn't spend time to read back.. still in the process of upgrading so files are off right now. sent the update to my live site.. $info is empty.. $info.show() is not used in accordion.. $name needs to be unique.. $name.show() doesn't seem to do anything in accordion... could be gone and still works.
Code:
<script>
$(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) { // Callback function if tab is switched
var $tab = $(this);
var $name = $('span', ' ');
$name.text($tab.text());
$name.show(); //not used
}
});
$('#verticalTab').easyResponsiveTabs({
type: 'vertical',
width: 'auto',
fit: true
});
});
</script>
Defining $info would work the same.