Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fitvids with AJAX call? #262

Open
randomwahaha opened this issue May 3, 2020 · 1 comment
Open

fitvids with AJAX call? #262

randomwahaha opened this issue May 3, 2020 · 1 comment

Comments

@randomwahaha
Copy link

Hi,

I'm having some issues with Fitvids.

  1. I kept calling it fitbit for some reasons.
  2. I'm currently running a wordpress theme (Caos), which implements AJAX calls through REST API , and Fitvids won't run unless I disable that AJAX call.

Is there a way to call Fitvids after the contents been loaded?

@davatron5000
Copy link
Owner

  1. can't fix that sorry! 😅
  2. so FitVids wants to run once at the bottom of the page. if you're fetching the page content later, then you'll have to manually trigger it. been awhile since I've used jQuery, but maybe hook into the ajaxSuccess event? Something like this:
jQuery(document).on('ajaxSucces', function() { jQuery(body).fitVids() })

I wouldn't know more without having a Reduced Test Case as outlined in the CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants