Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fade buttons stop nivoslider working

    Hi, I reckon this is pretty simple for u guys but I'm new to jquery code.

    Adding the code for the fade buttons breaks the nivoslider - any ideas?

    (All the below in header - jquery-1.3.2.min.js is a file on my machine)


    <link href="style.css" rel="stylesheet" type="text/css" />

    /* this below is nivoslider code */

    <link rel="stylesheet" href="nivoslider/nivoslider/nivo-slider.css" type="text/css" media="screen" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
    <script src="nivoslider/nivoslider/jquery.nivo.slider.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(window).load(function() {
    $('#slider').nivoSlider();
    });
    </script>

    /* this below is fade button code - */

    <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    $('.static,.home,.products,.ordering,.contact').append('<span class="hover"></span>').each(function () {
    var $span = $('> span.hover', this).css('opacity', 0);
    $(this).hover(function () {
    $span.stop().fadeTo(500, 1);
    }, function () {
    $span.stop().fadeTo(500, 0);
    });
    });
    });
    </script>
    </head>

  • #2
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    er, solved!

    Simply placing the fade code above the standard stylesheet link fixed it - would be curious to know why though!


  •  

    Tags for this Thread

    Posting Permissions

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