Support » Plugin: Accordion Blocks » Add resize event

  • Resolved Hrohh

    (@hrohh)


    Hello, can you please trigger resize event after slideUp / slideDown in JS?
    Thank you

    
    function triggerResize() {
    	if (typeof(Event) === 'function') {
    	  // modern browsers
    	  window.dispatchEvent(new Event('resize'));
    	} else {
    	  // for IE and other old browsers
    	  // causes deprecation warning on modern browsers
    	  var evt = window.document.createEvent('UIEvents');
    	  evt.initUIEvent('resize', true, false, window, 0);
    	  window.dispatchEvent(evt);
    	}
    }	
    
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.