You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Портфолио https://www.behance.net/d4d4186e
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Актуальные контакты:
Telegram: @Nikker_web
E-Mail: tarasevich.email@gmail.com
Разрабатываю дизайн групп в соц сетях, сайтов, приложений, другой дизайн под заказ
Портфолио https://www.behance.net/d4d4186e
Question
Zeferot
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script > function one (objName) {
if ( $(objName).css('display') == 'none' ) {
$(objName).animate({height: 'show'}, 400);
} else {
$(objName).animate({height: 'hide'}, 200);
}
}
function two (objName) {
if ( $(objName).css('display') == 'none' ) {
$(objName).animate({height: 'show'}, 400);
} else {
$(objName).animate({height: 'hide'}, 200);
}
}
</script>
<body>
<div id="table" class="tab" >
<div class="row">
<span class="cell"><h1><img src="news/111.jpg" width="170" height="125" alt="" align="left" /> ЗАГОЛОВОК №1</h2>
<a href="#" onclick="one('#1'); return false"><img src="news/next.jpg" alt="" /></a>
<div id="1" style="display: none">
<p> РАЗВЕРНВШИЙСЯ ТЕКСТ №1 </p>
</div></span></div></div>
<div id="table" class="tab" >
<div class="row">
<span class="cell"><h1><img src="news/222.jpg" width="170" height="125" alt="" align="left" /> ЗАГОЛОВОК №2</h2>
<a href="#" onclick="one('#1'); return false"><img src="news/next.jpg" alt="" /></a>
<div id="1" style="display: none">
<p> РАЗВЕРНВШИЙСЯ ТЕКСТ №2 </p>
</div></span></div></div>
</body>
Так вот, ошибка в том, что при нажатии кнопки читать далее во втором блоке открывается текст первого блока и так независимо от колличества блоков.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.