Home > front end >  How to solve the asynchronous loading page lead to multiple load JS
How to solve the asynchronous loading page lead to multiple load JS

Time:12-13

I wrote a front page to load more, then I click to load more at enable AJAX asynchronous loading another page, but I click on it again to load more is click twice, asynchronous loading page will lead to two JS, lead to the same JS has two resources, how to solve this problem,

CodePudding user response:

This is the repeat binding to load more events,
Let events when the initial binding only once, don't again in event execution binding events,

CodePudding user response:

reference 1/f, the sky wave response:
this is the repeat binding to load more events,
Let events when the initial binding only once, don't again in event execute binding events,

I cancelled it so binding events at the beginning, and then is ok, he doesn't like this back to trigger other again,

CodePudding user response:

reference 1/f, the sky wave response:
this is the repeat binding to load more events,
Let events when the initial binding only once, don't again in event execute binding events,

I cancelled it so binding events at the beginning, and then is ok, he doesn't like this back to trigger other again,

CodePudding user response:

How do anything give know no fault code

CodePudding user response:

Well, ok, you right, just simple to describe, how to answer

CodePudding user response:

Some resources system loaded only once, and some will load for many times, usually do not require additional management, if you really need to manage, you need to design a load counter, loading quantity with limited is no longer a load request, after unloading system automatically, usually even wrote the code, usually delay for a period of time will be performed,
  • Related