I am trying build a slide show using the Cycle plugin.

My (simple) code issues a JSON request (getJSON) to obtain the URLs of a few
images. The images are displayed but the cycle method does not work, ie. all
the images are displayed, no 'cycle' happens. Images are not hosted on the
same machine as the one that replies to the JSON request.

Am I missing something ?

Below is an excerpt of my code:

Thanks.

----------------

$(document).ready(function(){   
$.getJSON('http://localhost:8501/testing/wwf_broadcast_json_4.cfc?method=wwf_feed&count=4&t_keyword='+word+'&i_keyword='+word,
 
        function(data) {
                        $('#images').empty;
                        
                        var html = '';
                        $.each(data.img, function(i, item) {
                                        html += ' ' + item.image + ' '
                        });
                        $('#images').append(html);
        });
;

});

</script>

</head>

<style>
.pics {  
    height:  232px;  
    width:   232px;  
    padding: 0;  
    margin:  0;  
} 
 
.pics img {  
    padding: 15px;  
    border:  1px solid #ccc;  
    background-color: #eee;  
    width:  200px; 
    height: 200px; 
    top:  0; 
    left: 0 
} 
</style>


<body>
wwf_header_widget.jpg 
<div id="images" class="pics"></div>

<script>
        $('#images').cycle('fade');
</script>
        
</body>






-- 
View this message in context: 
http://www.nabble.com/cycle-over-URLs-returned-from-JSON-request-tp14720960s27240p14720960.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to