Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
KnowledgeWoods Consulting
5,607 PointsPrint command
i want print command to work while selecting certain no. of check boxes and then using print button and also want to print multiple divs together.
1 Answer
Andrew VanVlack
20,155 PointsIf I understand you correctly, you want to allow the user to select options on the page which change the way the page prints? I would think the best way to do this it to have the javascript modify a print @media query depending on what options the user has checked. And then just bring up the print dialog with window.print() when the button is pressed.
KnowledgeWoods Consulting
5,607 PointsKnowledgeWoods Consulting
5,607 PointsCan you give an example?
Andrew VanVlack
20,155 PointsAndrew VanVlack
20,155 PointsSomething on the lines of (jquary):
Warnning: script is untested and just a general layout.
Its saying if your checkbox is checked apply this style inside an @media on this element.