Print only?
Print only?
Print only?
Here’s the “old school” way of doing it, which hopefully works across all browsers. In theory, you would use setAttribute unfortunately IE6 doesn’t support it consistently. var cssId = ‘myCss’; // you could encode the css path itself to generate id.. if (!document.getElementById(cssId)) { var head = document.getElementsByTagName(‘head’)[0]; var link = document.createElement(‘link’); link.id = cssId; … Read more
I am adding a new answer to reflect changes in later jQuery releases. The .live() method is deprecated as of jQuery 1.7. From http://api.jquery.com/live/ As of jQuery 1.7, the .live() method is deprecated. Use .on() to attach event handlers. Users of older versions of jQuery should use .delegate() in preference to .live(). For jQuery 1.7+ … Read more