Hey everybody, Pat right here from Salt Sturdy!
When you have hassle determining the place to even begin casting alongside a shoreline, you can be losing time
perform loadYouTubeIframeAPI(callback) {
var script = doc.createElement(‘script’);
script.src=”https://www.youtube.com/iframe_api”;
script.onload = perform () {
callback();
};
doc.head.appendChild(script);
}
(perform ($) {
perform onYouTubeIframeAPIReady() {
$(‘.embed-container’).every(perform () {
var container = $(this);
var videoId = container.information(‘video-id’);
container.participant = new YT.Participant(‘ytbplayer’ + videoId, {
playerVars: { ‘showinfo’: 0, ‘rel’: 0, ‘iv_load_policy’: 3, ‘autohide’: 1, ‘modestbranding’: 1 },
videoId: videoId,
occasions: {
‘onStateChange’: onPlayerStateChange(videoId)
}
});
});
}
perform sanitizeVideoId(videoId) {
return videoId.consists of(‘?’) ? videoId.cut up(‘?’)[0] : videoId
}
perform onPlayerStateChange(videoId) {
return perform (occasion) {
if (occasion.information === YT.PlayerState.ENDED) {
const sanitizedId = sanitizeVideoId(videoId);
console.log(‘YTB Video ‘ + videoId + ‘ has completed taking part in’);
console.log(‘YTB Video sanitizedId’ + sanitizedId + ‘ has completed taking part in’);
$(‘.after-video-cta.’ + sanitizedId).slideDown();
}
};
}
$(doc).prepared(perform () {
var videoId = ‘YVZxKQscaYI’;
$(‘.close-overlayYVZxKQscaYI, .no-thanks.YVZxKQscaYI’).click on(perform () {
console.log(‘YTB Video ‘ + videoId + ‘ clicked no thanks’);
$(‘.after-video-cta.’ + videoId).slideUp();
});
// Load the YouTube IFrame API synchronously and initialize the gamers
loadYouTubeIframeAPI(perform () {
if (typeof YT === ‘undefined’ || typeof YT.Participant === ‘undefined’) {
window.onYouTubeIframeAPIReady = onYouTubeIframeAPIReady;
} else {
onYouTubeIframeAPIReady();
}
});
$(‘#embed-containerYVZxKQscaYI .after-video-cta.after-video-cta-member .button.success’).click on(perform () {
console.log(‘GA:’, ‘Video CTA Member Sure Click on’)
gtag(‘occasion’, ‘click on’, {
‘event_category’: ‘button’,
‘event_label’: ‘Video CTA Member Sure Click on’,
‘worth’: 1
});
});
$(‘#embed-containerYVZxKQscaYI .after-video-cta.after-video-cta-public .button.success’).click on(perform () {
console.log(‘GA:’, ‘Video CTA Public Sure Click on’)
gtag(‘occasion’, ‘click on’, {
‘event_category’: ‘button’,
‘event_label’: ‘Video CTA Public Sure Click on’,
‘worth’: 1
});
});
$(‘#embed-containerYVZxKQscaYI .after-video-cta.after-video-cta-public .button.no-thanks’).click on(perform () {
console.log(‘GA:’, ‘Video CTA Public No Click on’)
console.log()
gtag(‘occasion’, ‘click on’, {
‘event_category’: ‘button’,
‘event_label’: ‘Video CTA Public No Click on’,
‘worth’: 1
});
});
});
})(jQuery);
Seize Your Slam Stick Medium Gentle Right here
On this video I’ll present you the varieties of locations it is advisable to begin casting to together with the varieties of locations you shouldn’t waste your time in
When you have any questions, let me know within the feedback under!
The publish Fishing a New Spot? Right here’s EXACTLY The place to Begin! appeared first on Salt Sturdy Fishing Membership.