javascript - Don't use jQuery DOM changes when printing -


update: css solution below.

i'm using fullpage.js jquery plugin unfortunately affects printing of webpage, displaying current viewport display , sibling.

the problem have print command uses dom (obviously), plugin has made inline css changes in dom. there way disable dom changes print?

this doesn't work, here's idea:

$(document).ready(function() {     if(@media !print) { // ps: not real code!         $('#fullpage').fullpage();     } }); 

------ css solution -------

praveen's reply led me on right course. css needed override fullpage.js inline styles are:

/* override javascript inline styles */ html, body {     overflow: visible !important;     height: auto !important; }  .fullpage-wrapper {     height: auto !important;     transform: none !important;     transition: none !important; }  .fp-section {     height: auto !important; }  .fp-slidescontainer {     width: auto !important;     transition: none !important;     transform: none !important; }  .fp-slides, .fp-slides * {     position: static !important; }  .fp-slide {     width: auto !important; } 

do in css:

hiding full page slides:

.fp-slides {   display: none; } 

or making them static, stuff rendering contents normally:

.fp-slides, .fp-slides * {   position: static !important;   /* don't putting !important,      there no other way override inline styles without this!*/ } 

else, can specify stylesheet apply screen media:

<link rel="stylesheet" href="fullpage.css" media="screen" /> 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -