Refactored into more dynamic solution.
Just add trigger with data-note attribute referencing the note.
Merge pull request #1 from jackpopp/master

Refactored into more dynamic solution and removed some code duplication.