Tagged: x
-
AuthorPosts
-
May 10, 2016 at 5:28 am #983818
I could not answer to a topic i posted some time ago: https://community.theme.co/forums/topic/how-to-display-all-accordions-open-in-media-print/
I want all accordions to be displayed open in the print-version of the browser.
after the latest updates this code does not work any longer, what do i have to change in the custom js code?
(function($) { var beforePrint = function() { $('.accordion-body').removeClass('collapse').css('height', 'auto'); $('.x-accordion-toggle').removeClass('collapsed'); }; var afterPrint = function() { $('.accordion-body').removeClass('collapse').css('height', 'auto'); $('.x-accordion-toggle').removeClass('collapsed'); }; if (window.matchMedia) { var mediaQueryList = window.matchMedia('print'); mediaQueryList.addListener(function(mql) { if (mql.matches) { beforePrint(); } else { afterPrint(); } }); } window.onbeforeprint = beforePrint; window.onafterprint = afterPrint; })(jQuery);
May 10, 2016 at 8:06 am #984030Hi there,
Upon checking your site, All accordions element are collapsed in print window, please see the attachment.
Hope it helps.
May 10, 2016 at 9:31 am #984168hi christopher,
the site ihrkonzept.de (from the previous-forum-entry) is not update yet, today i updated another webpage in x-theme to the newest theme/plugin-version: https://private-insuring.de/das-ideale-angebot/on this page the print-preview does not open the accordions
thanks for the fast reply,
elkeMay 10, 2016 at 10:21 am #984254just updated the other page and the same problem occured, now the accordions are closed in the print preview: https://ihrkonzept.de/private-insuring/fonds-und-etfs-zur-auswahl-fuer-sie/
on ihrkonzept.de i updated x version 4.2.2 to 4.4.2
so far,
elkeMay 10, 2016 at 8:46 pm #985174Hello Elke,
Please try adding the following custom CSS on Appearance > Customize > Custom > Edit Global CSS:
@media print { .x-accordion-body.collapse{ display:block !important; } }
See this video screencast of my test:http://screencast-o-matic.com/watch/cDhXVG19nA
Hope this helps. -
AuthorPosts