Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2321

    Hi,

    I created several accordion toggles with the special div code. This works fine.

    Only it creates extra space at the bottom of the page.

    How can I prevent this from happening?

    See here: http://sonartc.nl/wordpress/boeken/

    #37562

    Hey,

    the problem is caused by following code:

    <p><script type="text/javascript">// <![CDATA[
    jQuery('#toggle-1').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-2').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-3').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-4').contents().filter('br').remove();
    // ]]></script><br />

    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-1').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-2').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-3').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-5').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-6').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-7').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-8').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-9').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-10').contents().filter('br').remove();
    // ]]></script><br />

    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-11').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-12').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-13').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-14').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-15').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-16').contents().filter('br').remove();
    // ]]></script><script type="text/javascript">// <![CDATA[
    jQuery('#toggle-17').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-18').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-19').contents().filter('br').remove();
    // ]]></script><br />

    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-20').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-21').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-22').contents().filter('br').remove();
    // ]]></script><br />
    <script type="text/javascript">// <![CDATA[
    jQuery('#toggle-23').contents().filter('br').remove();
    // ]]></script></p>

    It looks like a plugin or php/js code is messing around with the theme/wordpress output. Did you modify custom.js? You can try to deactivate all plugins – if this solves your problem it’s very likely a plugin which outputs this code.

    #37563

    These ‘+’ symbols are called Toggles? Sorry for the simple question…I’m a first time developer and am learning as fast as I can. Are these already in the Theme? If not, How could I add them to my theme? http://www.ThaiBanyan.com

    Suggestions would be truly appreciated~

    Much Aloha From Hawaii~

    #37564

    Hey,

    to use the toggles shortcode use following code:

    Toggle Content Shortcodes
    The basic toggle got a title attribute to set the clickable title and the "active" keyword to create an opened toggle

    [toggle title='here goes the title of the toggle' active]
    Content goes here
    [/toggle]

    [toggle title='here goes the title of the toggle']
    Content goes here
    [/toggle]

    [toggle title='here goes another title of the toggle']
    Content goes here
    [/toggle]

    Accordion Toggles:
    Same code as before but each toggle gets the attribute "close='true"

    [toggle title='here goes the title of the toggle' close='true']
    Content goes here
    [/toggle]

    [toggle title='here goes the title of the toggle' close='true']
    Content goes here
    [/toggle]

    [toggle title='here goes another title of the toggle' close='true']
    Content goes here
    [/toggle]

    Everything can be found in the documentation file too (located in a folder called “documention”). I deleted your other comment to prevent cross postings.

    #37565

    Hi,

    I made a mistake by putting this code inside the portfolio items … :-(

    The space disappeared after removing these lines.

    Thanks

    #37566

    Glad that you solved the problem.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Accordion toggle’ is closed to new replies.