There is a drop down menu of this type. I don’t have two such points, but the same script opens and hides them. After executing the ajax request, the server sends me the new content <li class="active active_right" id="cart"> The structure of the html classes is absolutely identical, only the text changes. After this update, the script refuses to open this menu item, everything works with others. If the page is updated, the script starts working with this menu item.

  • maybe you forgot to hang the handlers on .dropdown-toggle again - KaZaca
  • @ KaZatsa and how to do it? - Torawhite
  • Thank you very much. Understood - Torawhite

1 answer 1

after updating the html-content handlers "fly off". you need, after the end of the ajax request and update the content to re-hang them, i.e. perform

 $('.dropdown-toggle').click(function(e) {... 
  • one
    that is, the script drop-down menu to register more in success ? - Torawhite
  • Thank. Got it. I pushed code into a function and called it after the request was completed - Torawhite