File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,11 @@ class="<?php
2929<script type="text/javascript">
3030jQuery(function( $ ) {
3131 var overlay = $( '#eu-cookie-law' ), initialScrollPosition, scrollFunction;
32- if ( overlay.hasClass( 'hide-on-button' ) ) {
33- overlay.find( 'input.accept' ).on( 'click', accept );
34- } else if ( overlay.hasClass( 'hide-on-scroll' ) ) {
32+ overlay.find( 'form' ).on( 'submit', accept );
33+ if ( overlay.hasClass( 'hide-on-scroll' ) ) {
3534 initialScrollPosition = $( window ).scrollTop();
3635 scrollFunction = function() {
3736 if ( Math.abs( $( window ).scrollTop() - initialScrollPosition ) > 50 ) {
38- console.log($( window ).scrollTop() - initialScrollPosition);
3937 accept();
4038 }
4139 };
@@ -60,7 +58,7 @@ function accept( event ) {
6058 }
6159
6260 var expireTime = new Date();
63- expireTime.setTime( expireTime.getTime() + <?php echo $ cookie_validity ; ?> ); // 30 days
61+ expireTime.setTime( expireTime.getTime() + <?php echo $ cookie_validity ; ?> );
6462
6563 document.cookie = '<?php echo $ cookie_name ; ?> =' + expireTime.getTime() + ';path=/;expires=' + expireTime.toGMTString();
6664
You can’t perform that action at this time.
0 commit comments