Superb jQuery custom content scroller – how to implement
-
Hello,
I’m trying to implement this great plugin on my new wordpress website. I have to admin that I’m not expert in WP. I have succesfully implemented the scroller on my static website. However I cannot work out how to make it working in WP.
This is an address to plugin.
https://manos.malihu.gr/jquery-custom-content-scrollerSo far I have updated Functions.php
<?php function init_js(){ if(!is_admin()){ /* jquery (google CDN) */ wp_deregister_script('jquery'); wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js'); wp_enqueue_script('jquery'); /* jquery UI (google CDN) */ wp_deregister_script('jquery-ui-core'); wp_register_script('jquery-ui-core', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js'); wp_enqueue_script('jquery-ui-core'); /* easing */ wp_register_script('easing', get_bloginfo('template_directory') . '/js/jquery.easing.1.3.js','', '1.3', true); wp_enqueue_script('easing'); /* mousewheel */ wp_register_script('mousewheel', get_bloginfo('template_directory') . '/js/jquery.mousewheel.min.js','', '1.0', true); wp_enqueue_script('mousewheel'); /* custom scrollbar */ wp_register_script('mCustomScrollbar', get_bloginfo('template_directory') . '/js/jquery.mCustomScrollbar.js','', '1.0', true); wp_enqueue_script('mCustomScrollbar'); } } add_action('init', 'init_js'); add_theme_support( 'menus' ); ?>
and called it in header.php
<script> (function($){ $(window).load(function(){ $("#TextBottom").mCustomScrollbar(); }); })(jQuery); </script>
where #TextBottom is my div where I would like to have the scroller.
Please help I stuck on this.
Thanks
Martin
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Superb jQuery custom content scroller – how to implement’ is closed to new replies.