Displaying images in Thumbnail Image Gallery

Here I am trying to create an Image Gallery: http://jsfiddle.net/5wETg/62/.

var xml = "<rss version='2.0'><channel> <image>http://www.nikon.com/swf/img/thumbnail_ophthalmic_lenses.png</image> <image>http://www.nikon.com/swf/img/thumbnail_ophthalmic_lenses.png</image> <image>http://www.nikon.com/swf/img/thumbnail_ophthalmic_lenses.png</image> <limage>http://images1.videolan.org/images/largeVLC.png</limage> <limage>http://images1.videolan.org/images/largeVLC.png</limage> <limage>http://images1.videolan.org/images/largeVLC.png</limage>   </channel></rss>",

xmlDoc = $.parseXML( xml ),
$xml = $( xmlDoc ),
$image= $xml.find( "image" );
$limage = $xml.find("limage");

$( "#thumbs" ).append( $image.map(function(){
        return $('<img>', {className: 'thumbnails', src:$(this).text()})[0];

        $( "#panel" ).append( $image.map(function(){
        return $('<img>', {className: 'largeimages', src:$(this).text()})[0];

I have to show both the thumbnail images and larger images, but there is problem images are not getting displayed. I need some help.


There are a couple of problems:

  • The first append() is not being closed correctly (you're missing the closing ));
  • You are using the image array instead of limage for the larger images.

Here's a working DEMO.

Need Your Help

Shared libraries and binaries in C

c shared-libraries freebsd

I took over a fairly large C code. There are lots of legacy binaries that are requiring old version shared libraries. The server has never versions of those exact libraries. I could recompile or se...