There is a drop-down list, implemented approximately as follows:
<ul> <li> <div class="block"></div> <p>Блок 1</p> <span> <b>Тут много текста</b> <input type="text" placeholder="ENTER HERE"> </span> </li> <li> <div class="block"></div> <p>Блок 2</p> <span> <b>Тут много текста</b> <input type="text" placeholder="ENTER HERE"> </span> </li> </ul> There is some text in the list, and a form.
Js:
$(function(){ $('ul li').click(function(){ $('span', this).toggle(); }); }); Now the problem is, if you click on the form, the list will immediately close, how to avoid it?
Also, using css, I added a triangle, which, when clicked, should rotate 180 degrees, how best to implement it?
Here is an example on jsfiddle
e.stopPropagation()- Grundy