1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.Cycle is not working on a simple slideshow

Discussion in 'jQuery' started by Darius Shojaei, Oct 3, 2013.

  1. #1
    This is my first time using Jquery on a site. I'm just trying to create a simple slide show with the cycle function so that i can change between two images of the same size. Can someone with experience tell me what i'm missing in my code for this function to work correctly? So far i can get anything to actually cycle.

    <head>
    <style>
    #slideshow {
        width:785px;
        height:268px;
    }</style>
    
    <script>
    $('document').ready(function (){
        $('#banner #slideshow').cycle({
            fx: 'fade'
        });
    })
    </script>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Lumbre Fire Tribe</title>
    <link href='http://fonts.googleapis.com/css?family=Belleza' rel='stylesheet' type='text/css'>
    <link href="style.css" rel="stylesheet" type="text/css" media="all" />
    </head>
    
    
    <body>
        <script type="text/javascript" src="jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="script.js"></script>
        <script type="text/javascript" src="jquery.cycle.js"></script>
    
    <div id="banner"><img src="Site_Content/images/images/Lumbre_Mock_2_07.png"/>
            <div id="slideshow">                                                          <!--Slide Show -->
                <img src="Site_Content/images/Lumbre_Mock_2_10.jpg" alt="Image 1" />
                <img src="Site_Content/images/Lumbre_Mock-Recovered-Recovered_03.jpg" alt="Image 2" />
            </div>
        </div>
    </body>
    </html>
    
    
    HTML:

     
    Darius Shojaei, Oct 3, 2013 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    It's $(document), not $('document') - change that, and my guess it'll start working...
     
    PoPSiCLe, Oct 3, 2013 IP