DD I use the function of expanding the text!
<script type="text/javascript"> $(document).ready(function(){ $(".btn-slide").click(function(){ $("#panel").slideToggle("slow"); }); }); </script> The following is the Html code:
<div id="panel"> Центральный процессор IBM System x3100 434832X<br> </div> <p class="slide"><a href="#" class="btn-slide">Подробнее...</a></p> And even lower CSS (just in case)
# panel { display: none; } .slide { margin: 0; padding: 0; } .btn-slide { text-align: right; padding-right:10px; margin: 0 auto; display: block; font-family:verdana, Helvetica, sans-serif; font-size:14px; color: #0387db; text-decoration: none; } Everything works fine with one object! But when I duplicate and want another block to open too, I ask all the classes and id, it depresses the first block when pressed. When duplicating classes with a different name and additionally prescribing functions with the same classes, it starts working! Tell me how to make two units work from one function! Respectfully!