JavaScript Hooks
Post Connector includes the following JavaScript hooks:
sp_delete_child
Since 1.3.0
Fired when a user clicks the delete link in the backend, before the AJAX request is send.
[js]$(‘body’).bind(‘sp_delete_child’, function(event, post_id) {
// Your code
});[/js]
sp_child_deleted
Since 1.3.0
Fired when a child is deleted in the backend.
[js]$(‘body’).bind(‘sp_child_deleted’, function(event, post_id) {
// Your code
});[/js]
sp_sorting_childs
Since 1.3.0
Fired when a user reorders the child items in the backend, before the AJAX request is send.
[js]$(‘body’).bind(‘sp_sorting_childs’, function(event, sp_items) {
// Your code
});[/js]
sp_childs_sorted
Since 1.3.0
Fired when the child items in the backend are reordered.
[js]$(‘body’).bind(‘sp_childs_sorted’, function(event, sp_items) {
// Your code
});[/js]