Skip to content

Instantly share code, notes, and snippets.

View shubhampateliitm's full-sized avatar
🎯
Focusing

Shubham Patel shubhampateliitm

🎯
Focusing
View GitHub Profile
@remy
remy / details.js
Created April 18, 2010 22:28
Add <details> support - includes stylesheet
/**
* Note that this script is intended to be included at the *end* of the document, before </body>
*/
(function (window, document) {
if ('open' in document.createElement('details')) return;
// made global by myself to be reused elsewhere
var addEvent = (function () {
if (document.addEventListener) {
return function (el, type, fn) {