empreinte-digitale/orejime

How to re-open preferences

jbfelix opened this issue · 3 comments

Hello,

I would like to have a link to re-open / reset the visitor preferences.
I tried this but it's not working:
$(document).ready(function(){ $( '.gdprprefs' ).on( 'click', function() { $( this ).orejime.show(); }); });
Any help ?

Done:

<span class="gdprprefs"><i class="fa fa-eye-slash" aria-hidden="true"></i></span>
Then:

<script>
 document.querySelector('.gdprprefs').addEventListener('click', function() {
                orejime.show();
            }, false);
</script>

Working example:

https://www.lodewijkdevadder.net

Hi,
sorry I didn't have time to take a look sooner, glad you found a solution!
(And thank you for posting it 😉 )

hi, it's a fork of klaro :)
on the klaro page you have other example how to open modal

If you wish to open the consent manager manually on user interaction (for example through a link in the privacy policy), you can use the klaro.show() global. Example:
<a class="button is-success" onclick="return klaro.show();">Change consent settings</a>
just change klaro.show() by orejime.show()