WordPress.org

Ready to get started?Download WordPress

Forums

FitVids for WordPress
[resolved] FitVids & Ajax? (5 posts)

  1. Austin Nichols
    Member
    Posted 1 year ago #

    How do I get FitVids to work on items loaded via Ajax after page load?

    http://wordpress.org/extend/plugins/fitvids-for-wordpress/

  2. Kevin Dees
    Member
    Plugin Author

    Posted 1 year ago #

    unfortunately this is something that you would need to create a callback for with your Ajax call. FitVids only runs when the page is loaded. Anything added to the page with JS will need to be coded for within the theme.

  3. nimmolo
    Member
    Posted 1 year ago #

    Hi Kevin,
    so is there a fitvids-created function I can call, if FitVids is activated, to run on Ajax-loaded content?

    I'm using Infinite Scroll and it does provide for js callbacks, but i'm not sure what function to call.

  4. Kevin Dees
    Member
    Plugin Author

    Posted 1 year ago #

    You can run fitvids at any time using the standard call. However, the object you select needs to only contain the new content. If you run fitvids on an item twice you will run into issues.

    $("#thing-with-videos").fitVids()

    To do what you are asking you might be able to run the above function using the selector or object returned by the ajax call.

  5. Kevin Dees
    Member
    Plugin Author

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.