简体   繁体   中英

How do I call a javascript function after AJAX loads content?

I'm using some code for infinite scrolling on a Tumblr blog using AJAX, and it works very well except for when it comes to loading certain Flash content. The code for the infinite scroll is here .

I have a partial solution to the problem of Flash content using some code suggested by Daniel K , a user on this site. I have implemented the code for calling the function on page load, however I cannot figure out how to call the function after the AJAX loads content for the infinite scroll.

I have several themes for Tumblr and a number of people have asked me to implement infinite scroll. I have been reluctant to add it because of the Flash problem. Any help would be appreciated, thanks.

The code in this answer can probably be fixed up a bit, but it should work for you in the time being. Just make sure to place it within your infinite scroll callback.

Tumblr Audio & Video + Infinite Scroll

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM