notes at "startup" + other call back options - NEED HELP

36 views
Skip to first unread message

Najeeb Buzinessware

unread,
Sep 8, 2013, 8:14:27 AM9/8/13
to jquery-st...@googlegroups.com
var moved = function(note) {
saveNoteDetails( note.id, note.text, note.pos_x, note.pos_y, note.height, note.width );
}
var resized = function(note) {
saveNoteDetails( note.id, note.text, note.pos_x, note.pos_y, note.height, note.width );
}
var created = function(note) {
saveNoteDetails( note.id, note.text, note.pos_x, note.pos_y, note.height, note.width );
}
var edited = function(note) {
saveNoteDetails( note.id, note.text, note.pos_x, note.pos_y, note.height, note.width );
}
var deleted = function(note) {
saveNoteDetails( note.id, note.text, note.pos_x, note.pos_y, note.height, note.width );
}
function saveNoteDetails(getID, getText, getTop, getLeft, getHeight, getWidth){
console.log('Node with ID = ' + getID + ' with text = ' + getText + ' with top = ' + getTop + ' with left = ' + getLeft + ' with height = ' + getHeight + ' with width = ' + getWidth);
}

var options = {
notes:[{"id":1,
 "text":"Test Internet Explorer",
 "pos_x": 50,
 "pos_y": 50,
 "width": 200,
 "height": 200
}]
};

$('#notes').stickyNotes(
{ moveCallback: moved, resizeCallback: resized, editCallback: edited, createCallback: created, deleteCallback: deleted }
);

How can i add Options along with those callback functions. when i add it as saperate one those call backs are applying to those specific notes!!
Reply all
Reply to author
Forward
0 new messages