Skip to content

just our typical auto enhance-able component skeleton

License

Notifications You must be signed in to change notification settings

tomgreenhill/component

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Component

Just a simple auto-enhance-able component skeleton. It's not a widget factory, just for simple stuff.

Start by setting the componentName var to whatever the class name of your component happens to be (wihtout the .). Then drop your typical logic into the each statement.

The script will auto-initialize your component whenever an enhance event is triggered on a parent element.

We typically add this to kick things off when the DOM is ready:

$( function(){ $( document ).trigger( "enhance" ); } );  

...and then trigger enhance on newly appended markup as well.

About

just our typical auto enhance-able component skeleton

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%