There is a block with input as in the picture below. It is necessary to select an album, for the subsequent loading of pictures into this album. When you select (Press input radio), the text of the album description is displayed.
So, in the added code, the div is displayed as needed, but with one nuance. When selected, old divs do not close. It is necessary to correct the existing code so that when selecting the album, the old description is closed and the new one appears.
Clearly described?
As a result, you need a code that closes the div from the block that cleans up the checked.
Example:
<script type="text/javascript"> $(document).ready(function(){ show("bloggood1", "cat1","$_GET[a]"); }); function show(bloggood, cat, id){ bloggood = document.getElementById(bloggood); cat = document.getElementById(cat); albom = document.getElementById('albom_vibor'); if (bloggood.checked){ albom_vibor.value = id; cat.style.display = "block"; }else{ albom_vibor.value = ''; cat.style.display = "none"; }; }; </script> <div class='addimage-albom-box'> <input type='radio' name='bloggood' class="radio" id="bloggood$albom[id]" onchange='show("bloggood$albom[id]","cat$albom[id]","$albom[id]");'/> <label for='bloggood$albom[id]'>$albom[title]</label> <div id='cat$albom[id]' class='addimage-albom-box-opisanie'> $albom[opisanie] <small>Вы выбрали этот альбом. Теперь Вы можете загрузить картинку в него.</small> </div> </div> 