Easy Unobstructive jQuery Print Page Tutorial
Ever wondered how to use jQuery to create a print page button… this tutorial shows you the easiest way possible.
Thanks to jQuery there is an easier way to create Print This Page buttons, and yes it doesn’t involve an onclick=” event… here is all the code it involves:
$(document).ready(function() {
$(.printMe’).click(function() {
window.print();
return false;
});
});
Now remember kids, we need [...]
Ever wondered how to use jQuery to create a print page button… this tutorial shows you the easiest way possible.
Thanks to jQuery there is an easier way to create Print This Page buttons, and yes it doesn’t involve an onclick=” event… here is all the code it involves:
$(document).ready(function() {
$(.printMe').click(function() {
window.print();
return false;
});
});
Now remember kids, we need to add the jquery library at top, and the code above needs to be in the script tags! Now all you need to do is add the printMe class to anything that you want to trigger a page print.
Enjoy 
Related posts:
- How to make a completely reusable jquery modal window
- Simple Fast and Dirty Introduction to jQuery
- Using multiple versions of jQuery on the same page
- Top 10 jQuery Snippets (including jquery 1.4)
- 10 Awesome jQuery and JavaScript Snippets
Did you absolutely LOVE this article... share it!
Comments
I really appreciate for providing such wonderful information. Hard to find good css blogs in these days…I found your blog on google and read a few of your other posts. Look forward to reading more from you in the future.
Nice information! Do carry same stuff in future as well.
Cheer!
Web design company
Can Someone Find A Really Good Tutorial On How To CSS Code Layouts For Websites?
Animated Layouts
As far as the code of css is concerned; the code you need to write in your css page; this requires some study; however, if you only need it to change color and letter size or perform basic similar alterations, you need a couple of hours perhaps to understand what needs to be done.
Twitter layouts
CSS is really really easy, but its also a very important tool in web developing. Thanks for the information. This is really very helpful for every person and for me also.myspace layouts
Leave your own!