Fix PDF Embedder not Resized in Closed Accordions


The PDF Embedder plugin allows you to easily embed PDFs in your web pages. When the browser window is resized, PDF Embedder resizes PDFs to fit the new space available to them. However, when a PDF is hidden inside a closed Divi accordion module toggle, it isn't resized when the browser window is resized. Thus when the accordion toggle is opened, the PDF displays at the old, incorrect size.

This can be fixed by adding the following jQuery code to your site:

/* Fix PDF Embedder not resizing in closed accordions */
	$('.et_pb_accordion .et_pb_toggle_title').on('click', function() {
		var $toggle = $(this).closest('.et_pb_toggle');
		if ($toggle.hasClass('et_pb_toggle_close')) {
				function() {

This post may contain referral links which may earn a commission for this site

Hundreds of new features for Divi
in one easy-to-use plugin


Submit a Comment

Your email address will not be published. Required fields are marked *