Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1208885
    Alan
    Participant

    Hi Support Team,

    Thank you for the great theme.

    I am attempting to execute a small piece of Java Script inside [accordion], whereby that script is re-execute each time the specific accordion element holding the code is clicked open. But my attempted implementation (an abstracted code fragment below) results in the script inside the accordion executing only once at page load, and then not again until there is a refresh of the page.

    Is this single executing of the code related to my use of TotalCache, my browser caching, or my implementation. If it is my implementation, please let me know what I should adjust.

    Thank you for your assistance!

    —–

    [accordion]
    [accordion_item title="Content 1"]

    First half of text for content 1

    [pullquote type=”right”]
    <script>{
    var d = new Date();
    var n = d.getSeconds();
    if (n % 2 == 0)
    document.write (“The quick brown fox”);
    else
    document.write (“jumps over the lazy dog.”);
    }
    </script>[/pullquote]

    Second half of text for content 1

    [/accordion_item][accordion_item title="Content 2"]

    Text for content 2

    [/accordion_item][/accordion]

    #1208900
    Rupok
    Member

    Hi there,

    Thanks for writing in! The code supposed to execute once in each load as I can see your code. However we can’t help much on such custom code as it’s out of our support scope.

  • <script> jQuery(function($){ $("#no-reply-1208885 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>