Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
/ details-tag Public archive

A polyfill for <details> tag.

Notifications You must be signed in to change notification settings

denis-sokolov/details-tag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

A polyfill for <details> tag.
Unfortunately, a seamless integration was unsuccessful.
To manipulate <details> tags from Javascript, use our API:

Know if a tag is open or no:
	$('details').details()

Open a tag
	$('details').details('open')

Close a tag
	$('details').details('close')

Event handlers:
	$('details').on('open', function(){
		console.log('Opened ', $(this));
	});
	$('details').on('close', function(){});

Initialize polyfill on some new elements:
	myDetailsTag.details('init')

To make a tag animated
	<detail class=animated>

To control animation speeds
	<detail class=animated data-animation-speed="slow/fast/1000">

This will also manipulate native implemenations.

About

A polyfill for <details> tag.

Resources

Stars

Watchers

Forks

Packages

No packages published