Skip to content

Instantly share code, notes, and snippets.

// JS
$(document).ready(function() {
$('#nav').scrollspy({
min: $('#nav').offset().top, onEnter: function(element, position) {
$("#nav").addClass('fixed');
}
, onLeave: function(element, position) {
$("#nav").removeClass('fixed');
}
}
<h2>fancyBox v3.3 - Video parameters</h2>
<hr class="my-5" />
<ul>
<li>
<a data-fancybox href="https://www.youtube.com/watch?v=_sI_Ps7JSEk&amp;autoplay=1&amp;rel=0&amp;controls=0&amp;showinfo=0">
YouTube video - hide controls and info
</a>
</li>