Jquery adds and removes multiple image layers on a div

I have a problem finding the right function or logic to solve this problem for adding layers to a div (transperant png).

This is part of the "configurator" for potential products.

a semi-working demo (shirt example) can be found here:

http://jsfiddle.net/obmerk99/9t4f4/16/

If I use append () - as you can see that it is commented out in the code - it will be added endlessly - how can I remove the previous option (only from the same group of parameters)

1 - Which function should I use here?

2 - How can I make a division of groups without using several selected divs (I will have 50-60 options ..) - or in another scenario, how to create them automatically?

3 - How to make it work for radio / flags?

Edit i

Explanation of the word Lame:

I have โ€œgroupsโ€ of options, all refer to the same product. Each group "option" corresponds to a transparent png with an image of the option or the corresponding part.

For example, if I am tuning a car, I will have a group of options for โ€œwheelsโ€ with images of different wheels, options for a โ€œwindowโ€ with different windows, a group of โ€œcolorโ€ options, etc. etc ... As a result, they add up and create a complete image configuration. This is a bit like those sites that create avatars or cartoony images where you can choose a head, muctache, background, transparency, hair, etc.

+3
source share
3 answers

, , , , , , .

, , fiddle .

EDIT: , , ,
.

<select id="optionX"> <img id="img-optionX"> <span id="desc-optionX">

. fiddle

, ( select) , .

. fiddle

+2

, , MMO. PHP GD- " " ( ), , . , script .

, , JQuery ? , , Flash HTML 5.

0

Try executing the JS code code you commented on.

$('#prod').empty().append('<img id="prod-image" style="z-index:1;" src="http://img8.uploadhouse.com/fileuploads/16068/1606810537372e83db57b46d5a2d44d3124ac999.png"/>').append('<span id="collar"><img style="z-index:2;" src="'+data[value].img+'"/>Control Text : </span>');

0
source

All Articles