www.webdeveloper.com
Results 1 to 2 of 2

Thread: Need help combining two scripts together

  1. #1
    Join Date
    Apr 2012
    Posts
    3

    Need help combining two scripts together

    Hello all, I've been banging my head against a wall for the past few days trying to figure out why when I add another script to my page the old one stops working. Finally I found the answer, but due to still being extremely new to javascript - and coding in general - I have not been able to successfully combine the two scripts that I have. I know it is very simple, so would someone mind either walking me thru it, or just giving me an end product to see where I was going wrong? I would really appreciate any input!

    The two scripts I have are

    Nivo slider
    Code:
     	<script type="text/javascript">
        $(window).load(function() {
            $('#slider').nivoSlider({
                effect: 'random', // Specify sets like: 'fold,fade,sliceDown'
                slices: 15, // For slice animations
                boxCols: 8, // For box animations
                boxRows: 4, // For box animations
                animSpeed: 1300, // Slide transition speed
                pauseTime: 5000, // How long each slide will show
                startSlide: 0, // Set starting Slide (0 index)
                directionNav: true, // Next & Prev navigation
                directionNavHide: false, // Only show on hover
                controlNav: true, // 1,2,3... navigation
                controlNavThumbs: false, // Use thumbnails for Control Nav
                controlNavThumbsFromRel: false, // Use image rel for thumbs
                controlNavThumbsSearch: '.jpg', // Replace this with...
                controlNavThumbsReplace: '_thumb.jpg', // ...this in thumb Image src
                keyboardNav: true, // Use left & right arrows
                pauseOnHover: true, // Stop animation while hovering
                manualAdvance: false, // Force manual transitions
                captionOpacity: 0.8, // Universal caption opacity
                prevText: 'Prev', // Prev directionNav text
                nextText: 'Next', // Next directionNav text
                randomStart: false, // Start on a random slide
                beforeChange: function(){}, // Triggers before a slide transition
                afterChange: function(){}, // Triggers after a slide transition
                slideshowEnd: function(){}, // Triggers after all slides have been shown
                lastSlide: function(){}, // Triggers when last slide is shown
                afterLoad: function(){} // Triggers when slider has loaded
            });
        });
        </script>
    Nav menu plugin

    Code:
     	<script type="text/javascript">
        $(document).ready(function () {
             
            $('#nav li').hover(
                function () {
                    //show its submenu
                    $('ul', this).slideDown(500);
         
                },
                function () {
                    //hide its submenu
                    $('ul', this).slideUp(300);        
                }
            );
             
        }); 
        </script>

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,674
    what kind of error have you got? and, if you found the answer, what is it?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles