Hello. So here's the stitch. I was asked to modify some existing code to only prompt the user to save changes when a change was actually made and not every time the new page button was pressed - which was what it was currently doing.
I've ran into a bit of a snag with one part. It uses this plugin http://mjsarfatti.com/sandbox/nestedSortable/ to allow the user to sort pages that are created.
It also runs a separate javascript function to hide and delete pages. So I added a global var that gets changed from 0 to 1 when either of these two functions are called and changed it so it only prompts if the var == 1. So this part works fine.
The trouble is with the sorting function. Is there a way for me to monitor when it's triggered - without having to mess around with the plugin code? Something like:
if(nestedSortable is triggered){
changed = 1;
}