Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Front Page Events -->
- <!-- This PHP snippet hides the Upcoming Events slider from all but the front page as selected in WordPress Settings -->
- <?php
- if (is_front_page() )
- echo '<div id="front-page-slider"' . do_shortcode('[smartslider3 slider="3"]' . '</div');
- else
- { }
- # do nothing ?>
- <!-- This script makes the Upcoming Events slider disappear on scrolldown and reappear on scrollup -->
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
- <script>
- $(window).scroll(function() {
- var y = $(this).scrollTop();
- if(y > 250) {
- $('#front-page-slider').slideUp();
- }
- if (y < 250) {
- $('#front-page-slider').slideDown();
- }
- if(y+ $(this).height() == $(document).height()) {
- $('#front-page-slider').fadeOut();
- }
- });
- </script>
- <!-- End Front Page Events -->
Add Comment
Please, Sign In to add comment