Last active
July 21, 2019 14:50
-
-
Save jrevillini/a0d38709d8526ae197944a5200ab94d8 to your computer and use it in GitHub Desktop.
open slidebar after 2 secconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_footer', function () { ?> | |
<script> | |
// don't run until main slidebars init has happened to avoid JS error | |
jQuery( window ).on( 'ocs_after', function () { | |
// @TODO add cookie test | |
// @TODO add skip list | |
// @TODO add config based on body class or something | |
// the default | |
setTimeout( function () { | |
var s = new slidebars(); | |
s.init(); | |
s.open( 'ocs-fteaserslidebar' ); | |
}, 2000 ); | |
} ); | |
</script><?php | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment