<ol> <li>1</li> <li>2</li> <li>3</li> </ol> <script> $('li').click(function () { $(this); // Например клик по li 2 }); <script>
For example, the user clicked on li 2 , is it possible to click on li neighbors, in this case 1 and 3 , when clicking on li? If so, how to access them?
There are no identifiers for li. There is only ol inside li . ol on page a few. Allowed to assign only an identifier to the object ol