Last active
December 12, 2015 03:28
-
-
Save eugenoprea/4706814 to your computer and use it in GitHub Desktop.
Add Cloud Box scripts to footer
This file contains 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 Cloud Box scripts to footer */ | |
function eo_add_scripts_to_footer() { | |
wp_enqueue_script('jquery'); | |
wp_enqueue_script('jquery-scrolltofixed', get_stylesheet_directory_uri() . '/js/jquery-scrolltofixed-min.js', array('jquery'), '', true); | |
} | |
add_action('wp_enqueue_scripts', 'eo_add_scripts_to_footer'); | |
function eo_add_extra_script_to_footer() { | |
?> | |
<script> | |
jQuery(document).ready(function($) { | |
$('#sidebar-cloud-box').scrollToFixed({ marginTop: 10 }); | |
}); | |
</script> | |
<?php | |
} | |
add_action('wp_footer', 'eo_add_extra_script_to_footer', 99); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment