Hi there!
I’m having a problem with X Video Lock button. I made a custom jQuery function to make the delay button work with the same behavior (remove the overlay layer and stay on the same page) as the close button in the upper corner. It only works once (you have to delete the cookies and history in order to make it work again).
This is my jQuery function:
jQuery(document).ready(function($) {
$(’.x-video-lock-overlay .x-btn’).click(function(e) {
e.preventDefault();
$(‘html, body’).css(‘overflow’, ‘’);
$(‘html, body’).removeAttr(‘style’);
$(’.x-video-lock-overlay’).remove();
});
});
(function( $ ) {
$(window).load(function(){
$(’.x-video-lock-overlay .x-video-lock-btn-wrap .x-btn’).on(“click”, function(e) {
$(‘html, body’).css(‘overflow’, ‘’);
$(’.x-video-lock-overlay’).remove();
$(‘html, body’).removeAttr(‘style’);
console.log(‘button clicked…’)
e.preventDefault();
});
});
})(jQuery);
Also, I want to make a cookie to show the video lock layer only once per session.
Thanks!