Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function collective_enqueue() {
- wp_enqueue_script( 'jquery' );
- wp_register_script('collective-jquery-touchwipe', get_bloginfo('stylesheet_directory') .'/scripts/jquery.touchwipe.1.1.1.js', NULL, array('jquery'));
- wp_enqueue_script('collective-jquery-touchwipe');
- wp_register_script('collective-jquery-cycle', get_bloginfo('stylesheet_directory') .'/scripts/jquery.cycle.all.js', NULL, array('jquery'));
- wp_enqueue_script('collective-jquery-cycle');
- }
- add_action( 'after_setup_theme', 'collective_enqueue' );
- function collective_scripts() { ?>
- <?php if (is_front_page()) { ?>
- <script type="text/javascript">
- jQuery(document).ready(function(){
- jQuery('#imagegallery img:first').fadeIn(1000, function() {
- jQuery('#imagegallery').cycle({
- fx: 'fade',
- containerResize: 1,
- height: 'auto',
- speed: 1800,
- timeout: 3400,
- delay: 2000,
- prev: '#prev',
- next: '#next',
- pauseOnPagerHover: true,
- cleartype: 1 // enable cleartype corrections
- });
- jQuery("#imagegallery").touchwipe({
- wipeLeft: function() {
- jQuery("#imagegallery").cycle("next");
- },
- wipeRight: function() {
- jQuery("#imagegallery").cycle("prev");
- }
- });
- });
- });
- </script>
- <?php } ?>
- <?php }
- add_action( 'wp_head', 'collective_scripts' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement