Strange YouTube embed coding question
Strange YouTube embed coding question
Out of context: Reply #8
- Started
- Last post
- 22 Responses
- ESKEMA0
You download the file fitvid.js and upload it to the server, or just use a cdn version:
https://cdnjs.cloudflare.com/aja…You paste that line into your HTML, you also need to have jquery running before it. If you don't have jquery already paste this before the fitvid line:
https://cdnjs.cloudflare.com/aja…Then you need to initialize it all.
This is what it should look like:
https://cdnjs.cloudflare.com/aja…
https://cdnjs.cloudflare.com/aja…
<script>
$(document).ready(function(){
// Target your .container, .wrapper, .post, etc.
$(".thing-with-videos").fitVids...
});
</script>I recommend taking the JavaScript to another file and load it by its src but that way will work just fine if you don't understand what I'm saying.
- Damn, screwed up on the script sources, of course they should be inside <script src="path/to/jquery.min.js"></script>ESKEMA
- Its fine I literally didnt understand any of this anyway. Im just going to keep it as is without any of this scaling.CygnusZero4