Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Richard 1 post 21 karma points
    Mar 22, 2013 @ 11:10
    Richard
    0

    Adding a jquery slideshow to a homepage panel

    Complete newbie question. 

    I've put some script into a macro, to try and show a small slideshow on one of the Standard MVC template pannels but it's not working (just showing the images side by side), can anyone tell me what I'm doing wrong (I've made the assumption within the cshtml file I can include the style and script elements)

    ------

     

    <style type="text/css">

    .CyclePics { height: 232px; width: 232px; margin: auto }

    .CyclePics img { padding: 15px; border: 1px solid #ccc; background-color: #eee; }

    </style>

    <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"></script>

    <script type="text/javascript">

    $(document).ready(function() {

        $('.CyclePics').cycle({

    fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...

    });

    });

    </script>

     

    <div class="CyclePics"> 

        <img src="/media/2080/freeport.jpg" width="200" height="200" alt="Freeport"/> 

        <img src="/media/2081/hornseagolf.png" width="200" height="200" alt="Hornsea golf club" />

    </div> 

  • Greg McMullen 49 posts 195 karma points
    Jun 14, 2013 @ 17:49
    Greg McMullen
    0

    You haven't included jQuery in your template. Once you do that, it should work just fine.

Please Sign in or register to post replies

Write your reply to:

Draft