Title: Toggle widget resize window when open
Last modified: November 13, 2018

---

# Toggle widget resize window when open

 *  Resolved [leanne17](https://wordpress.org/support/users/leanne17/)
 * (@leanne17)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/toggle-widget-resize-window-when-open/)
 * I am trying to use the PDF Embedder plugin in the toggle widget but the embedded
   pdfs show up as tiny boxes.
 * The plugin FAQs say that I need to implement the following java script to force
   the window to revise after the tab is opened.
 * window.dispatchEvent(new Event(‘resize’));
 * I don’t know my way around java script. Has anyone done this and provide some
   guidance. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [leanne17](https://wordpress.org/support/users/leanne17/)
 * (@leanne17)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/toggle-widget-resize-window-when-open/#post-10882391)
 * After doing some research I’ve found people have had the same problem with accordion
   modules in another drag and drop page editor.
 * The suggested code to fix the issues was this
 * jQuery( function(){
    jQuery( ‘.fl-accordion’ ).on( ‘fl-builder.fl-accordion-toggle-
   complete’, function(){ try { window.dispatchEvent(new Event(‘resize’)); } catch(
   e ) { var ev = document.createEvent(‘Event’); ev.initEvent(‘resize’, true, true);
   window.dispatchEvent(ev); } } ); } );
 * I could use some help modifying it for Elementor’s toggle widget.
 * Thanks.
    -  This reply was modified 7 years, 6 months ago by [leanne17](https://wordpress.org/support/users/leanne17/).
 *  [armandovalencia](https://wordpress.org/support/users/armandovalencia/)
 * (@armandovalencia)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/toggle-widget-resize-window-when-open/#post-11066885)
 * Hi Leanne17 did you mage to fix your code? im kind of looking the same thing.
   Any advice?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Toggle widget resize window when open’ is closed to new replies.

 * ![](https://ps.w.org/elementor/assets/icon-256x256.gif?rev=3444228)
 * [Elementor Website Builder - more than just a page builder](https://wordpress.org/plugins/elementor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elementor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elementor/)
 * [Active Topics](https://wordpress.org/support/plugin/elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elementor/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [armandovalencia](https://wordpress.org/support/users/armandovalencia/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/toggle-widget-resize-window-when-open/#post-11066885)
 * Status: resolved