Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the question-answer domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u845912282/domains/pickplugins.com/public_html/wp-includes/functions.php on line 6121
Accordion jQuery UI Options not working

Accordion jQuery UI Options not working

0
Accordion jQuery UI Options not working 1
Anonymous
Nov 01, 2018 09:16 PM 1 Answers General
Member Since Jan 1970
Unsolved Solved Mark as Solved Mark as Unsolved
Subscribed Subscribe Not subscribe
Flag(0)

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
Accordion jQuery UI Options not working 2
Submit Answer
Please login to submit answer.
1 Answers
Sort By:
Best Answer
0
Accordion jQuery UI Options not working 3
PickPlugins
Nov 01, 2018
Flag(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

Sign in to Reply
Replying as Submit


Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/u845912282/domains/pickplugins.com/public_html/wp-content/plugins/post-grid/includes/functions-builder.php on line 10