This time I will share jQuery Plugin and tutorial about Print Specific Elements On Page – jQuery printObject, hope it will help you in programming stack.
printObject is a tiny jQuery print plugin which enables the users to print any html elements with custom header and footer on the webpage.
How to use it:
1. Just include the jQuery printObject plugin’s script printObject.js after jQuery JavaScript library and you’re ready to go.
1 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
2 |
< script src = "printObject.js" ></ script > |
2. The JavaScript to print the html table within your document.
1 |
$( "table" ).printObject(); |
3. Print the html table with custom header & footer.
1 |
$( "table" ).printObject({ |
2 |
header: "<h2> jQuery Script </h2>" , |
4. Apply your own styles to the header & footer.
1 |
$( "table" ).printObject({ |
2 |
header: "<h2> jQuery Script </h2>" , |
3 |
header_style: 'color: red;' , |
5 |
footer_style: "color: blue; font-size: 14px;" |
This awesome jQuery plugin is developed by Ciepcin. For more Advanced Usages, please check the demo page or visit the official website.