0
Anonymous
Hello,
in the past I was able to use something like that:
jQuery(document).ready(function(){ var o = (new Date).getDay(); // Get the Daynumber var c = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag")[o]; // Set a name fr the number (4 = Donnerstag) "Montag" == c ? (jQuery("#accordions-272.accordions").accordion("option","active",0), jQuery("#accordions-273.accordions").accordion("option","active",0), jQuery("#accordions-274.accordions").accordion("option","active",0), jQuery("#accordions-275.accordions").accordion("option","active",0)): "Dienstag"==c?(jQuery("#accordions-272.accordions").accordion("option","active",1), jQuery("#accordions-273.accordions").accordion("option","active",1), jQuery("#accordions-274.accordions").accordion("option","active",1), jQuery("#accordions-275.accordions").accordion("option","active",1)): "Mittwoch"==c?(jQuery("#accordions-272.accordions").accordion("option","active",2), jQuery("#accordions-273.accordions").accordion("option","active",2), jQuery("#accordions-274.accordions").accordion("option","active",2), jQuery("#accordions-275.accordions").accordion("option","active",2)): "Donnerstag"==c?(jQuery("#accordions-272.accordions").accordion("option","active",3), jQuery("#accordions-273.accordions").accordion("option","active",3), jQuery("#accordions-274.accordions").accordion("option","active",3), jQuery("#accordions-275.accordions").accordion("option","active",3)): "Freitag"==c&&(jQuery("#accordions-272.accordions").accordion("option","active",4), jQuery("#accordions-273.accordions").accordion("option","active",4), jQuery("#accordions-274.accordions").accordion("option","active",4), jQuery("#accordions-275.accordions").accordion("option","active",4)) });
But after the last updates this solution does not work anymore for me. I get an error in the browser console.
(Uncaught Error: cannot call methods on accordion prior to initialization; attempted to call method 'option')
Did this plugin use the jquery ui accordion still? Or have anything changed in the code?
Thanks for your help.
Greetings
Magnus
2 Subscribers
Submit Answer
1 Answers
Best Answer
0
Welcome to our forum.
Can you please run your code under footer at the bottom, i hope this will still work with the latest version.
We just optimize js file loading not include on site header but under shortcode where loading accordion.
Let me know the update.
Regards