Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8203453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:33:49+00:00 2026-06-07T07:33:49+00:00

I often combine multiple jQuery plugins and only to find them not working properly

  • 0

I often combine multiple jQuery plugins and only to find them not working properly together.

The below example combines 2 effects: thumbnails appear one by one, and disappearing scroll bar.

This one has both jQuery toward the bottom of the html, but only “appear one by one” is working. It somehow disabled the scroll bar function:

http://heidixu.com/creative/test/index2.html

And this one has “appear one by one” jQuery commented out, and display: none; from the css taken out, all a sudden the scroll bar function is working again:

http://heidixu.com/creative/test/index2.html mouse over content area to see scroll bar appear and disappear.

How do I have multiple plugins working together?

Thanks much!

Edit: to make it easier, I thought I attache the code to this.

disappearing scroll bar:

<script type="text/javascript">
            $(function() {

                // the element we want to apply the jScrollPane
                var $el                 = $('#jp-container').jScrollPane({
                    verticalGutter  : -16
                }),

                // the extension functions and options  
                    extensionPlugin     = {

                        extPluginOpts   : {
                            // speed for the fadeOut animation
                            mouseLeaveFadeSpeed : 500,
                            // scrollbar fades out after hovertimeout_t milliseconds
                            hovertimeout_t      : 1000,
                            // if set to false, the scrollbar will be shown on mouseenter and hidden on mouseleave
                            // if set to true, the same will happen, but the scrollbar will be also hidden on mouseenter after "hovertimeout_t" ms
                            // also, it will be shown when we start to scroll and hidden when stopping
                            useTimeout          : true,
                            // the extension only applies for devices with width > deviceWidth
                            deviceWidth         : 980
                        },
                        hovertimeout    : null, // timeout to hide the scrollbar
                        isScrollbarHover: false,// true if the mouse is over the scrollbar
                        elementtimeout  : null, // avoids showing the scrollbar when moving from inside the element to outside, passing over the scrollbar
                        isScrolling     : false,// true if scrolling
                        addHoverFunc    : function() {

                            // run only if the window has a width bigger than deviceWidth
                            if( $(window).width() <= this.extPluginOpts.deviceWidth ) return false;

                            var instance        = this;

                            // functions to show / hide the scrollbar
                            $.fn.jspmouseenter  = $.fn.show;
                            $.fn.jspmouseleave  = $.fn.fadeOut;

                            // hide the jScrollPane vertical bar
                            var $vBar           = this.getContentPane().siblings('.jspVerticalBar').hide();

                            /*
                             * mouseenter / mouseleave events on the main element
                             * also scrollstart / scrollstop - @James Padolsey : http://james.padolsey.com/javascript/special-scroll-events-for-jquery/
                             */
                            $el.bind('mouseenter.jsp',function() {

                                // show the scrollbar
                                $vBar.stop( true, true ).jspmouseenter();

                                if( !instance.extPluginOpts.useTimeout ) return false;

                                // hide the scrollbar after hovertimeout_t ms
                                clearTimeout( instance.hovertimeout );
                                instance.hovertimeout   = setTimeout(function() {
                                    // if scrolling at the moment don't hide it
                                    if( !instance.isScrolling )
                                        $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 );
                                }, instance.extPluginOpts.hovertimeout_t );


                            }).bind('mouseleave.jsp',function() {

                                // hide the scrollbar
                                if( !instance.extPluginOpts.useTimeout )
                                    $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 );
                                else {
                                clearTimeout( instance.elementtimeout );
                                if( !instance.isScrolling )
                                        $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 );
                                }

                            });

                            if( this.extPluginOpts.useTimeout ) {

                                $el.bind('scrollstart.jsp', function() {

                                    // when scrolling show the scrollbar
                                clearTimeout( instance.hovertimeout );
                                instance.isScrolling    = true;
                                $vBar.stop( true, true ).jspmouseenter();

                            }).bind('scrollstop.jsp', function() {

                                    // when stop scrolling hide the scrollbar (if not hovering it at the moment)
                                clearTimeout( instance.hovertimeout );
                                instance.isScrolling    = false;
                                instance.hovertimeout   = setTimeout(function() {
                                    if( !instance.isScrollbarHover )
                                            $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 );
                                    }, instance.extPluginOpts.hovertimeout_t );

                            });

                                // wrap the scrollbar
                                // we need this to be able to add the mouseenter / mouseleave events to the scrollbar
                            var $vBarWrapper    = $('<div/>').css({
                                position    : 'absolute',
                                left        : $vBar.css('left'),
                                top         : $vBar.css('top'),
                                right       : $vBar.css('right'),
                                bottom      : $vBar.css('bottom'),
                                width       : $vBar.width(),
                                height      : $vBar.height()
                            }).bind('mouseenter.jsp',function() {

                                clearTimeout( instance.hovertimeout );
                                clearTimeout( instance.elementtimeout );

                                instance.isScrollbarHover   = true;

                                    // show the scrollbar after 100 ms.
                                    // avoids showing the scrollbar when moving from inside the element to outside, passing over the scrollbar                              
                                instance.elementtimeout = setTimeout(function() {
                                    $vBar.stop( true, true ).jspmouseenter();
                                }, 100 );   

                            }).bind('mouseleave.jsp',function() {

                                    // hide the scrollbar after hovertimeout_t
                                clearTimeout( instance.hovertimeout );
                                instance.isScrollbarHover   = false;
                                instance.hovertimeout = setTimeout(function() {
                                        // if scrolling at the moment don't hide it
                                    if( !instance.isScrolling )
                                            $vBar.stop( true, true ).jspmouseleave( instance.extPluginOpts.mouseLeaveFadeSpeed || 0 );
                                    }, instance.extPluginOpts.hovertimeout_t );

                            });

                            $vBar.wrap( $vBarWrapper );

                        }

                        }

                    },

                    // the jScrollPane instance
                    jspapi          = $el.data('jsp');

                // extend the jScollPane by merging 
                $.extend( true, jspapi, extensionPlugin );
                jspapi.addHoverFunc();

            });
        </script>

Thumbnails appear one by one:

<script type="text/javascript">
            $(function() {
                // Start showing the divs
                showDiv();
            });

            function showDiv() {
                // If there are hidden divs left
                if($('div:hidden').length) {
                    // Fade the first of them in
                    $('div:hidden:first').fadeIn();
                    // And wait one second before fading in the next one
                    setTimeout(showDiv, 500);
                }
            }
        </script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:33:52+00:00Added an answer on June 7, 2026 at 7:33 am

    In general, jquery plugins are supposed to work independently.

    There are several reasons why they may not, but all are dependent upon flaws with one or both of the plugins themselves.

    You will often get jquery plug-ins failing due to conflict of HTML class name, id, etc. For instance, a disappearing scroll-bar is very likely some conflicting CSS that didn’t play nicely when used from your tool.

    Also common: Some jquery selector within the plug-in overwrites some html writing from another tool.

    A work-around – use iframe elements to separate the two pages from each other.

    Or look into the plug-ins and see if there is any way to create a prefix to the classnames utilized by the plugin. This may help because it will keep your css class names independent.

    Otherwise, just look into the DOM from firebug or another tool. See what CSS styles and HTML elements are involved in the issue to get a hint at something you might do to fix it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Often I need to combine data from multiple tables and display the result in
Often when I'm working on a project with others, the amount of library paths
Often, I would like to build up complex regexps from simpler ones. The only
Often I find myself in a situation where I have to deal with catching
I often use the excellent find program in Bash to list files with certain
Had a question that I've often wondered about. Is it better to have multiple
I have two search/replace commands that I find myself running in vim fairly often
I'm downloading a logfile quite often from a ftp-server (which I'm not in control
I'm pretty new to WPF. I often find my self struggling with getting a
I have multiple partials which may or may not be included in a given

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.