-
AuthorPosts
-
February 2, 2015 at 4:17 pm #389386
Hello
I’ve a number of accordions set to open and then close when another is clicked, but currently, when opened, each stays open even when others are clicked
Any ideas
thanks
Alf
February 3, 2015 at 12:05 am #389755Hello,
Have you tried disabling all third-party plugins to see if it gets fixed?
Regards,
JosueFebruary 5, 2015 at 4:45 pm #391431This reply has been marked as private.February 6, 2015 at 12:46 pm #391986Hi!
The toggles work fine when I checked the page. Also, I noticed that you’re using an old version of the theme. Please download the latest version from your themeforest account then update the theme via FTP. Please refer to this link for more info: http://kriesi.at/documentation/enfold/updating-your-theme-files/
Regards,
IsmaelFebruary 10, 2015 at 4:52 pm #393773This reply has been marked as private.February 10, 2015 at 5:11 pm #393783This reply has been marked as private.February 11, 2015 at 11:23 am #394209Hey!
I can see the issue now. Please try to install this plugin: https://wordpress.org/plugins/jquery-updater/
Regards,
IsmaelFebruary 11, 2015 at 4:56 pm #394454This reply has been marked as private.February 13, 2015 at 5:33 pm #395897Hi!
You probably do not need these lines.
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js” type=”text/javascript”></script> <script src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js” type=”text/javascript”></script>
I’m not sure what the effect will be from adding this part to all pages.
<script>// <![CDATA[ jQuery(function() { jQuery( “#accordion1, #accordion2, #accordion3, #accordion4, #accordion5, #accordion6,, #accordion7, #accordion8, #accordionMinor1, #accordionMinor2, #accordionMinor2plus” ).accordion({ active: false, collapsible: true, autoHeight: false, navigation: true }); }); // ]]></script>
But if you want to try then you can add this to the bottom of your functions.php file.
add_action( 'wp_footer', 'enfold_customization_footer_scripts' ); function enfold_customization_footer_scripts() { ?> <script>// <![CDATA[ $(function() { $( “#accordion1, #accordion2, #accordion3, #accordion4, #accordion5, #accordion6,, #accordion7, #accordion8, #accordionMinor1, #accordionMinor2, #accordionMinor2plus” ).accordion({ active: false, collapsible: true, autoHeight: false, navigation: true }); }); // ]]></script> <?php }
It might be best to just add the script manually to the pages where you need it.
Best regards,
Elliott- This reply was modified 9 years, 9 months ago by Elliott.
February 16, 2015 at 12:12 pm #396628This reply has been marked as private.February 16, 2015 at 5:37 pm #396849Hey!
Try adding this at the very end of your theme / child theme functions.php file:
function enq_jquery() { wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); } add_action('wp_enqueue_scripts', 'enq_jquery');
Cheers!
JosueFebruary 17, 2015 at 10:32 am #397332Hi Josue
Thanks for your perseverance but still no joy.
Any other suggestions?
Alf
February 18, 2015 at 1:03 pm #398068Hi!
Wanted to check your website but i get “Error establishing a database connection”. Please let us know when connection issue is fixed
Cheers!
YigitFebruary 18, 2015 at 4:15 pm #398220Hi Yigit
Should be up there now.
thanks
Alf
February 18, 2015 at 4:25 pm #398230Hi!
Can you please try adding following code to Functions.php file as well?
function enqueue_js_files() { wp_enqueue_script( 'script-name', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js', array(), true ); wp_enqueue_script( 'script-name', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', array(), true ); } add_action( 'wp_enqueue_scripts', 'enqueue_js_files' );
Cheers!
YigitFebruary 19, 2015 at 11:19 am #398772Hi Yigit
No joy with this either plus the main menu (generally) and the slider on the home page are now offset to the left
Is there a way to get the JQuery Scripts (as above) to load only in the content of the page (i.e. not in the Header or the Footer)?
Thanks
Alf
February 20, 2015 at 5:06 pm #399751Hey!
You can add them to a codeblock element. You really shouldn’t be adding an extra copy of jQuery though unless it requires a specific jQuery version.
Cheers!
ElliottFebruary 20, 2015 at 6:15 pm #399793Hi Elliot
Sure I understand that but don’t really want to have to check all 200+ pages just to see if they contain an accordion and then have to add a GCB with my JQuery script in to ensure they work.
Surely there’s a way to ensure these elements work without having to do that?
Thanks
Alf
February 24, 2015 at 5:16 pm #401526Hey!
I’m sorry but I’m not really sure I understand what your trying to do. What are global content blocks? I’ve checked all of the links you provided but the accordions are all working fine.
Best regards,
ElliottFebruary 24, 2015 at 6:45 pm #401603This reply has been marked as private.February 25, 2015 at 8:13 am #401891Hi!
I’m not sure if this is going to work but you can try this on functions.php:
add_action('ava_after_main_container','ava_after_main_container_mod'); function ava_after_main_container_mod() { echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>'; echo '<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js" type="text/javascript"></script>'; }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.