Не меняется иконка ссылки блока?
Добрый день.
Есть закрывающийся и открывающийся блок, но не работает иконка ссылки, не меняется плюс на минус, в чём проблема, чего не хватает? Скрипт: <script> function collapsElement(id) { if ( document.getElementById(id).style.display != "none" ) { document.getElementById(id).style.display = 'none'; } else { document.getElementById(id).style.display = ''; } } </script> <script type="text/javascript"> function put(id,str) { document.getElementById(id).value = str; } </script> html: <table> <tr> <td><a class="movie_openers" href="javascript:collapsElement('identifikator')" title="" rel="nofollow">Описание</a></td> </tr> </table> <div id="identifikator" style="display:none;"> <p><div class="opisanie">Текст описания</div></p></div> сss: .movie_openers { background: url("http://vash-online.ru/images/pls_mns.gif") 0px -14px no-repeat transparent; color: #FAB383; font-size: 11px; font-weight: 400; margin-left: 5px; padding-left: 15px; text-decoration: underline; } |
function collapsElement(id, self) { var el = document.getElementById(id); if ( el.style.display != "none" ) { el.style.display = 'none'; self.style.backgroundPosition = '0 -14px'; } else { el.style.display = ''; self.style.backgroundPosition = '0 0'; } return false; } <td><a class="movie_openers" href="" onclick="return collapsElement('identifikator', this)" title="" rel="nofollow">Описание</a></td> |
Спасибо друг! Неделю голову ломал)
|
Часовой пояс GMT +3, время: 02:22. |