As stated in title, how to I make it so that the zoom is disabled by default and enabled after pressing the button.
1 Answers
Hello Alex,
The plugin doesn’t have built-in function to solve your case. However it’s easy to implement with few lines of javascript code:
The plugin doesn’t have built-in function to solve your case. However it’s easy to implement with few lines of javascript code:
(function($) {
$(document).ready(function() {
setTimeout(function() {
$('.js-pdf-light-viewer-toggle-zoom').trigger('click');
}, 500);
});
})(jQuery);
Please place this code inside any javascript file on your page (here is some info about it https://codex.wordpress.org/Using_Javascript if you\’re not familiar with it yet). Or you even can use the plugin similar to https://wordpress.org/plugins/custom-css-js/ and paste the code there.
Please let me know if it will help.
Please login or Register to submit your answer