Javascript/JQuery not working until after page reload

前端 未结 2 1659
执念已碎
执念已碎 2020-11-30 15:29

This code is listed on the header of all of my webpages. When I click a link on my website, I\'m unable to use the buttons on the page until after I refresh. How can I fix t

2条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 15:59

    It seems Ajax loads content dynamically and ruins your bindings.

    You could call your function after each Ajax request using $.ajaxComplete()

    
    

提交回复
热议问题