SHOW:
|
|
- or go back to the newest paste.
| 1 | ***************** PAGE TEMPLATE ***************************** | |
| 2 | <?php | |
| 3 | /* | |
| 4 | * Template Name: Full Width | |
| 5 | */ | |
| 6 | get_header(); ?> | |
| 7 | ||
| 8 | ||
| 9 | <?php get_template_part( 'element', 'prepage' ); ?> | |
| 10 | ||
| 11 | <div id="txtlzr"></div> | |
| 12 | <script type="text/javascript"> | |
| 13 | jQuery(document).ready(function($){
| |
| 14 | var list = ['first blurb', 'second blurb', 'third blurb']; // list of blurbs | |
| 15 | ||
| 16 | var txt = $('#txtlzr'); // The container in which to render the list
| |
| 17 | ||
| 18 | var options = {
| |
| 19 | duration: 1000, // Time (ms) each blurb will remain on screen | |
| 20 | rearrangeDuration: 1000, // Time (ms) a character takes to reach its position | |
| 21 | effect: 'random', // Animation effect the characters use to appear | |
| 22 | centered: true // Centers the text relative to its container | |
| 23 | } | |
| 24 | ||
| 25 | txt.textualizer(list, options); // textualize it! | |
| 26 | txt.textualizer('start'); // start
| |
| 27 | }); | |
| 28 | </script> | |
| 29 | ||
| 30 | <?php get_footer(); ?> | |
| 31 | ******************* FUNCTIONS.PHP *********************** | |
| 32 | ||
| 33 | wp_register_script( 'textualizer', get_template_directory_uri() . '/assets/js/textualizer.js', array('jquery'),
| |
| 34 | false, true); | |
| 35 | wp_enqueue_script( 'textualizer'); |