WordPress.org

Forums

Superb jQuery custom content scroller - how to implement (2 posts)

  1. mk112
    Member
    Posted 3 years ago #

    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.
    http://manos.malihu.gr/jquery-custom-content-scroller

    So far I have updated Functions.php

    <?php
    function init_js(){
    if(!is_admin()){
    /* jquery (google CDN) */
    wp_deregister_script('jquery');
    wp_register_script('jquery', 'http://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', 'http://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

  2. mk112
    Member
    Posted 3 years ago #

    can anyone help.
    has anyone used it?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.