Hi,

I am having a small problem that my jquery function does work in
Safari but does not work in FF 3.5. I am not sure whether the problem
is with my coding skills, the jquery plugin that i use, jquery or even
FF 3.5 . If i run the code below then firebug gives this error:
  $(".dynamicsparkline").sparkline is not a function

however, the code in safari works flawlessly.

The expected result are two images from Flickr and one sparkline,  but
the result in FF 3.5 are two pictures and the text 'Loading...'

Your suggestions / help is much appreciated.

best regards,
Diederik

<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {

        $.getScript("jquery.sparkline.min.js", function(){
                $("body").append("<span class=\"dynamicsparkline\">Loading..<\/
span><br>");
                var myvalues = [10,8,5,7,4,4,1,64,3,3,6,2,55,35,15,6,16];
                $(".dynamicsparkline").sparkline(myvalues);
        });

        $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?
tags=cloud&tagmode=any&format=json&jsoncallback=?",
                function(data){
                $.each(data.items, function(i,item){
                $("<img/>").attr("src", item.media.m).appendTo("#images");
                        if ( i == 1 ) return false;
                });
                });

});

</script>

<title>Test Sparkline Page</title>
</head>
<body>
<div id="images"></div>

</body>
</html>

Reply via email to