Interfaith
Interfaith

Reputation: 145

Print page view in a scrolling contents in a webpage

I have a page with multiple scrolling slides inside a pane. Whenever I try to print the second slide, it always prints the first one which is loaded when user first visit the site. Is there any print function in Javascript or JQuery, which allows me to print slides which wasn't loaded first or even the contents that is visible to the user?

Upvotes: 0

Views: 1689

Answers (1)

freefaller
freefaller

Reputation: 19963

Have you looked at @media print { } and @media screen { } in CSS?

The first will be implemented when printing, the 2nd will be implemented on screen.

Purely as an example...

@media print {
   #myDiv { overflow : auto; }
}

@media screen {
   #myDiv { overflow : scroll; }
}

Upvotes: 1

Related Questions