PrintMe is a lightweight Plugin to print any html element.
I'm bored and a plugin was born. It is the story of my life. I'm bored, plugin, again and again ...
printMe is a jQuery plugin, so you gotta have that first:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
Then, just include jquery-printme.js, wherever it lives on your server:
<script src="path_to/jquery-printme.js"></script>
Now you can print any element.
Here are a few examples:
Basic:
$("#example").printMe();
With external css styles, add all stylesheets you can need in the array
$("#example").printMe({ "path": ["path_to/eternal.css","path_to/eternal2.css"] });
With title
$("#example").printMe({ "title": "The title" });
Options:
Col1 | Col2 | Col3 |
---|---|---|
A | B | C |
D | E | F |
Code:
$("#example").printMe();
Col1 | Col2 | Col3 |
---|---|---|
A | B | C |
D | E | F |
Code:
$("#example").printMe({
"path": ["path_to/eternal.css"]
});
Col1 | Col2 | Col3 |
---|---|---|
A | B | C |
D | E | F |
Code:
$("#example").printMe({
"path": ["path_to/eternal.css"],
"title": "Document title"
});
PrintMe has been developped by Daniel Arlandis @menusal
That's about all there is to know! Happy printing! If you find any interesting uses for this little library, please let me know!
Issues and Pull Requests are more than welcome!
If you have any questions, drop me a line at: daniarlandis@gmail.com