treehouse : what would you like to learn today?
Web Design Web Development iOS Development

AnythingSlider and Lightbox on same page

  • Hello,
    I cannot get to work both anythingslider and lightbox on the same page. Only one is working which is the bottom of the coding. How do both can run on the same page? thanks.
    My code:
    <!-- LightBox -->
    <script type="text/javascript">
    $(function slidegallery() {
    $('#gallery a').lightBox();
    });
    </script>
    <script type="text/javascript">
    $(function slider(){
    $('#slider').anythingSlider({
    autoPlay: true,
    delay: 10000,
    animationTime: 8000
    });
    });
    </script>
  • Try this instead:
    <!-- LightBox -->
    <script type="text/javascript">
    $(function() {
    $('#gallery a').lightBox();

    $('#slider').anythingSlider({
    autoPlay: true,
    delay: 10000,
    animationTime: 8000
    });
    });
    </script>
  • Thanks Mottie.... I have to change one of the $ to different name