Tagged: x
-
AuthorPosts
-
December 7, 2016 at 8:16 am #1284588
crydbergParticipantHi
Im trying to enable a show/hide function at our page http://indentive.se/startsida-2/ .
I have given the button an ID: clickme
I have given the section an ID: showme
and I have used Display:none for the section.This is what I use in JS
$( “#clickme” ).click(function() {
$( “#showme” ).toggle( “slow”, function() {
// Animation complete.
});
});Nothing happens. How does this work? / Why is it not working?
December 7, 2016 at 9:24 am #1284696
RupokMemberHi there,
Thanks for writing in! Your code doesn’t look right to do anything. Would you point us the buttons and the section? And clarify what you are trying to achieve. We’ll try to provide you some code for that.
Cheers!
December 8, 2016 at 3:43 am #1285843
crydbergParticipantHi!
Okey, I saw another user sending it in so thought it would work (my bad!).
I will try to explain.
In the section called “Info Gasell” we have a button that says and the justifications reads…
Under that section we have a section called “Show this”. (this section is display:none from the beginning since we don’t want it to show at first)What we want to happen:
When you push the button in the section “info gasell” we want the text in the section “show this” to pop out.
Like a read more-function. If you push the button again we want the text to fold in/be hidden.Any suggestion?
Thanks for your help.
December 8, 2016 at 4:13 am #1285871
Paul RModeratorHi,
You can try this third party plugin.
https://wordpress.org/plugins/toggles-shortcode-and-widget/screenshots/
Hope that helps.
December 8, 2016 at 7:18 am #1286006
crydbergParticipantHi,
Sorry I don’t understand how I am supposed to implement this in Cornerstone?
we are not using the “edit page”-function under pages since we are using cornerstone.
December 8, 2016 at 8:28 am #1286086
JoaoModeratorHi There,
You will be able to place the shortcode in Corstone Raw Code Element instead.
Let us know how it goes,
Joao
December 12, 2016 at 12:50 am #1289614
crydbergParticipantHi again,
It is starting to work now.
However, I have one final problem.
The initial state for the toggle box is “open”. We want it to start as closed.
Can you help me with this?December 12, 2016 at 1:10 am #1289626
Paul RModeratorYou can add opened=”closed” to your shortcode to make it close by default.
eg.
[otw_shortcode_content_toggle title="My Title" opened="closed"]Your Content[/otw_shortcode_content_toggle]Hope that helps.
December 12, 2016 at 3:03 am #1289669
crydbergParticipantThank you,
it works now!December 12, 2016 at 3:07 am #1289672
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1284588 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
