My first jquery page was to celebrate my new puppy, I had a few
pictures, and I read about JCarousel, so it was simple!

 http://cigar.dynalias.org/junior/


then I realized I needed more pictures, and being too lazy to update
the html every time, I decided to parse the index page from my server,
and let ajax do it's stuff... and since it was built into jCarousel, I
gave it a try!

http://cigar.dynalias.org/junior/index-2-dyn.html

And that worked great in my firefox, but it didn't show the
pictures.... It scrolled , and did everything, except the pictures.

So I guessed maybe my simplified callback was to blame:

function loadItemHandler(carousel, start, last, available){
        if (!available)
                jQuery.get("Pix", function(data) {
                        var hrefs = 
data.match(/(href\s*=\s*")[^"]*\.(jpe?g|gif|png)(")/gi);
                        for (i in hrefs) {
                                var url = "Pix/" + hrefs[i].match(/"(.*)"/)[1];
                                var item = carousel.add(i, '<a href="' + url + 
'" class="Pix"
target="Pix"><img src="' + url + ' /></a>');
                        }
                
                });
        carousel.loaded();
};
hmm, so I tried doing the ajax outside of  jCarousel...

http://cigar.dynalias.org/junior/index-3-dyn.html

        jQuery.get("Pix", function(data) {
                        var hrefs = 
data.match(/(href\s*=\s*")[^"]*\.(jpe?g|gif|png)(")/gi);
                        for (i in hrefs) {
                                var url = "Pix/" + hrefs[i].match(/"(.*)"/)[1];
                                jQuery("#mycarousel").prepend('\r\t\t\t<li><a 
href="' + url + '"
class="Pix" target="Pix"><img src="' + url + ' /></a></li>');
                        }
                        jQuery("#mycarousel").jcarousel({
                                        itemVisible: 2,
                                        itemScroll: 1,
                                        wrap: true,
                                        autoScroll:1,
                                        scrollAnimation: "slow"
                        });
                });


They all work in firefox, but safari croaks on the 2 ajax versions!

Any ideas?



-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒
░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░
▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒
░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░
▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒░▒
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to