- First instance the object
var stickyNotes = $('.container').stickyNotes({
removed: function (noteId){
// do something
},
edited: function (note){
// do something
},
moved: function (note){
// do something
},
resized: function (note){
// do something
}
});
- then, add button event
$('.add-note').on('click', function (e){
e.preventDefault();
stickyNotes.create();
});
Other options available:
'resizable'
(false) when true allows notes to be resized
'draggable'
(true) when true allows notes to be dragged
'bgImage'
(img/sticky/sticky-bg.png) allows using a custom background, or by disable image background (in favor of css)