I am working on OC 1.5.6.5 with Shoppica2 2.2.4 and I have been researching the console error I started receiving after upgrading my Jquery lib past 1.9 which is:
I have been researching the console error I started receiving after upgrading my Jquery lib past 1.9 which is:
“Uncaught Error: cannot call methods on accordion prior to initialization; attempted to call method ‘destroy’”
I understand it has to do with the timing of the library loading and the function running at the wrong time or due to the accordion being empty I believe from my research, but I have not been able to find a working way to rewrite this code to work. Any suggestions or workarounds for this?
jQuery( function($) {
function set_product_info() {
var w = $("html").width();
if (w < 768) {
$(".s_tabs").tbTabs("destroy");
$(".s_tab_box").accordion ({
autoHeight: false,
collapsible: true,
active: false
});
}
else {
$(".s_tab_box").accordion("destroy");
$(".s_tabs").tbTabs({ fx: { opacity: 'toggle', duration: 300 } });
}
}
|
|