pracuje na wordpresie i joomli. (na tamtych forach nie uzyskałem informacji odnoscie php)
wiem że w pliku functions.php za pomocą akcji musze dołożyć biblioteke jQuery
Kod
function doloczenie_bibliotek() {
<script src='<?php echo get_template_directory_uri(); ?>/includes/js/skrypt.js'></script>
}
add_action( 'wp_enqueue_scripts', 'doloczenie_bibliotek' );
<script src='<?php echo get_template_directory_uri(); ?>/includes/js/skrypt.js'></script>
}
add_action( 'wp_enqueue_scripts', 'doloczenie_bibliotek' );
do którego pliku .php musze dodac kod danego pluginu http://markgoodyear.com/2013/01/scrollup-jquery-plugin/
Kod
$(function () {
$.scrollUp({
scrollName: 'scrollUp', // Element ID
topDistance: '300', // Distance from top before showing element (px)
topSpeed: 300, // Speed back to top (ms)
animation: 'fade', // Fade, slide, none
animationInSpeed: 200, // Animation in speed (ms)
animationOutSpeed: 200, // Animation out speed (ms)
scrollText: 'Scroll to top', // Text for element
activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
});
});
$.scrollUp({
scrollName: 'scrollUp', // Element ID
topDistance: '300', // Distance from top before showing element (px)
topSpeed: 300, // Speed back to top (ms)
animation: 'fade', // Fade, slide, none
animationInSpeed: 200, // Animation in speed (ms)
animationOutSpeed: 200, // Animation out speed (ms)
scrollText: 'Scroll to top', // Text for element
activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
});
});