I'm not sure if i can ask this way, but i will try.
I use this YouTube fullscreen jquery plugin - Link
The problem is that i have to enter the YouTube video ID manually in the script. How do i get my ACF value to replace the videoId?
I have tried like this
<script>
var jsVideo = <?php echo get_field('hero_baggrundsvideo'); ?>;
(function($) {
$('#heroVideo').YTPlayer({
fitToBackground: true,
videoId: ''.$jsVideo.''
});
})(jQuery);
</script>
But it does not work. I have placed this script inside my php file.
I hope you get what i am trying to say.
Please correct me, if my question is wrong.