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

Exclude this script to specific DIV with grabbing css or id? #9

Closed
Uranbold opened this issue Sep 20, 2013 · 2 comments
Closed

Exclude this script to specific DIV with grabbing css or id? #9

Uranbold opened this issue Sep 20, 2013 · 2 comments

Comments

@Uranbold
Copy link

Hello,

Thanks for your awesome script but there has an one issue here. Any chance to exclude some div and disabling this script specific area?

Thanks again.

@Uranbold
Copy link
Author

Issue: I really need to exlude some areas.

We have selector: iframe. And we are including whole pages for example: selector: #main iframe.

But i really need to exclude this script on specific classes. Example:

selector: #main iframe,
exclude: .skip-video-fluid,

That's it and i really love if you help me. Thanks.

@Uranbold Uranbold reopened this Feb 28, 2014
@toddmotto
Copy link
Owner

There are two ways to do this, fluidvids (latest version 2.2.0) will add a data-fluidvids attribute (see here) for loaded videos that have been made fluid. Upon requerying fluidvids using fluidvids.apply();, it then re-runs portions of the script to make dynamically created/ajax videos fluid - whilst ignoring ones that have already been rendered.

Option 1: Add the data attribute initially:

<iframe src="//player.vimeo.com/video1" data-fluidvids="loaded"></iframe>

Option 2: Make use of the custom selector better by only applying to vids you need:

<iframe src="//player.vimeo.com/video1" class="makeFluid"></iframe>

<script>
fluidvids.init({
  selector: '.makeFluid',
  players: ['www.youtube.com', 'player.vimeo.com']
});
</script>

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

No branches or pull requests

2 participants