Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1371596

    the switches we can use as privacy shortcodes:

    do not respect the setting on : Auto Reload Page : Auto reload on both buttons.

    However, this would be a basic requirement to be able to use them effectively.

    #1371609

    Hi Guenter!

    Thank you for the inquiry.

    Would you like the site to reload every time the user click any of the privacy toggles? The page will only reload once the user click the “accept” or “do not accept” buttons as explained in the previous thread.

    // https://kriesi.at/support/topic/cookie-switch-buttons/#post-1369509

    Regards,
    Ismael

    #1371695
    #1371860

    Hi,

    How did you insert the privacy-container element in the video? If you want to move the video privacy toggle inside, you can directly add the html of the toggle or use the privacy shortcode. Now, to reload the page after accepting the video privacy shortcode, you can try this script.

    // reload the page after clicking the privacy toggles
    function ava_custom_script_privacy_toggle_reload()
    {
        ?>
        <script type="text/javascript">
             (function($) {
                $('.av-switch-aviaPrivacyVideoEmbedsDisabled').on('click', function() {
                    var input = $(this).find('#aviaPrivacyVideoEmbedsDisabled');
                    if(input.is(':checked')) location.reload( true );
                });
            })(jQuery);
        </script>
        <?php
    }
    add_action( 'wp_footer', 'ava_custom_script_privacy_toggle_reload', 9999 );
    
    

    This is the html of the video privacy toggle.

    
    <div class="av-switch-aviaPrivacyVideoEmbedsDisabled av-toggle-switch av-cookie-disable-external-toggle av-cookie-save-unchecked av-cookie-default-unchecked active"><label><input type="checkbox" id="aviaPrivacyVideoEmbedsDisabled" class="aviaPrivacyVideoEmbedsDisabled " name="aviaPrivacyVideoEmbedsDisabled"><span class="toggle-track"></span><span class="toggle-label-content">Hier klicken, um Videoeinbettungen zu aktivieren/deaktivieren.</span></label></div>
    

    Best regards,
    Ismael

    #1371875

    thanks – i will test it soon.

    #1372025

    Hi,

    No worries! Let us know if this works. :)

    Best regards,
    Ismael

    #1372047

    have a look at test page – your hint to reload it by an if clause was exactly what i need – i tested a different method
    see private content – and see also how it works now – best would be to have that switch now inside that privacy overlay.
    to be continued …

    #1372170

    Hi,

    Thank you for the update.

    Looks like the page only reloads when the toggle is clicked twice. Maybe because of the condition that we added in the script. The following line may require some adjustment like removing the condition for the input value altogether.

    if(input.is(':checked')) location.reload( true );
    

    Best regards,
    Ismael

    #1372382

    I can’t get it to work.
    I am looking for a solution that the page is reloaded on rejection and the checkbox remains unchecked.The switch on #av-consent-extra-info behaves this way. But a sitch placed inside content not.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.