0

I want to create this: Multi Image Change

If you click on the Color picker Tumbnail("Farbe:"), other Pic will appear in the "pvImagesContent" section. I tried this on my self:

http://m4terialrmk.bplaced.net/list%20zoomer/demo.html

So far so good but now I cant figure out how to go on? I tried to put the several list zoom control in a div and make one appear and another disappear, but it broke my functionality.

Or must I just change the image path with help of Javascript? If so, I just want to change a section of the img path.

img/red/pic-1.jpg >>will be>> img/blue/pic-1.jpg

  • 4
    Just so you know, _JavaScript_ and _Java_ are two completely different languages. Read this for more info: [What's the difference between JavaScript and Java?](http://stackoverflow.com/questions/245062/whats-the-difference-between-javascript-and-java) – Nate Kibler Apr 01 '14 at 17:23
  • of what i get from your problem. you should change the src of you image on the basis of the click on the thumbnail. Also load all the images on page load itself. – Vikram Apr 02 '14 at 07:16

1 Answers1

0

You can use the jQuery

$(function() {
    $('img').each(function() {
        if($(this).attr('src').indexOf('/red/')) ($(this).attr('src')).replace("/red/","/blue/");
    });
});
system7
  • 130
  • 1
  • 8