-
AuthorPosts
-
December 19, 2018 at 8:30 pm #1047376
Is there a filter or css that I can use to have the toggle title/icon on the accordion element to be on the bottom when expanded?
Meaning, once clicked, the title/icon will be fixed on the bottom of the “revealed” content – instead of being on the default top?
thanks!December 19, 2018 at 9:22 pm #1047398Hey jomo5280,
This is something that would require a bit of custom coding and theme editing via the help of a freelancer or experienced coder.
Best regards,
Jordan ShannonDecember 19, 2018 at 11:06 pm #1047471Understood – I was trying to mess with toggle.js file – I think i just need to move a DIV down to the bottom – but for some reason hasn’t been successful.
I did find a Jfiddle dropdown example- but can’t seem to get the script to load in enfold correctly.
I am using Snippets to add the functional file – but not working.Do you know the correct syntax to add this to the functions file? Does it need to use jQuery?
$('#open-close-toggle').on("click", function(){ var $arrows = $(this).find("img"); $('#toggle-section').slideToggle(function(){ $arrows.toggle(); }); });
December 20, 2018 at 2:08 am #1047550Resolved!
I needed a different type of toggle with arrow up/down and be at the bottom of the content when opened. (and not mess with core Enfold toggle.php files)
I got this jfiddle to work by adding it via snippets plugin:add_action( 'wp_head', function () { ?> <script> jQuery(document).ready(function($) { $('#open-close-toggle').on("click", function(){ var $arrows = $(this).find("img"); $('#toggle-section').slideToggle(function(){ $arrows.toggle(); }); }); }); </script> <?php } );
Here is the URL to the Jfiddle Toggle in case it helps anybody in the future: https://jsfiddle.net/hibbard_eu/kBJKb/
December 20, 2018 at 5:50 pm #1047834Hi jomo5280,
Glad you got it working for you and thank you for sharing your solution! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.